Made to Order Software Corporation Logo

LLChatLib: LLStringFn Namespace Reference

LLStringFn Namespace Reference

Functions

void replace_ascii_controlchars (std::basic_string< char > &string, char replacement)
 Replace all control characters (c < 0x20) with replacement in string.

void replace_nonprintable_and_pipe_in_ascii (std::basic_string< char > &str, char replacement)
 Replace all non-printable characters and pipe characters with replacement in a string. NOTE - this will zap non-ascii.

void replace_nonprintable_in_ascii (std::basic_string< char > &string, char replacement)
 Replace all non-printable characters with replacement in string. NOTE - this will zap non-ascii.

std::string strip_invalid_xml (const std::string &input)
 Remove all characters that are not allowed in XML 1.0. Returns a copy of the string with those characters removed. Works with US ASCII and UTF-8 encoded strings. JC.


Detailed Description

Many of the 'strip' and 'replace' methods of LLStringUtilBase need specialization to work with the signed char type. Sadly, it is not possible (AFAIK) to specialize a single method of a template class. That stuff should go here.


Function Documentation

void LLStringFn::replace_ascii_controlchars ( std::basic_string< char > &  string,
char  replacement 
)

Replace all control characters (c < 0x20) with replacement in string.

Replace all control characters (0 <= c < 0x20) with replacement in string. This is safe for utf-8.

Parameters:
[in,out] string the to modify. out value is the string with zero non-printable characters.
The replacement character. use LL_UNKNOWN_CHAR if unsure.
void LLStringFn::replace_nonprintable_and_pipe_in_ascii ( std::basic_string< char > &  str,
char  replacement 
)

Replace all non-printable characters and pipe characters with replacement in a string. NOTE - this will zap non-ascii.

Parameters:
[in,out] the string to modify. out value is the string with zero non-printable characters and zero pipe characters.
The replacement character. use LL_UNKNOWN_CHAR if unsure.
void LLStringFn::replace_nonprintable_in_ascii ( std::basic_string< char > &  string,
char  replacement 
)

Replace all non-printable characters with replacement in string. NOTE - this will zap non-ascii.

Parameters:
[in,out] string the to modify. out value is the string with zero non-printable characters.
The replacement character. use LL_UNKNOWN_CHAR if unsure.
Generated on Thu Sep 23 17:18:49 2010 for LLChatLib by  doxygen 1.6.3