Provides string manipulation functions. More...
Functions | |
void | EscapeXML (eC_String &rkText) |
void | ReplaceAll (eC_String &rkText, const eC_String &rkSearchText, const eC_String &rkReplacement) |
void | ReplaceCharacters (eC_String &rkText, eC_UInt uiPos, eC_UInt uiLen, const eC_String &rkReplacement) |
StringList | TokenizeString (const eC_String &ckString, const eC_Char ccSeparator) |
void | UnescapeXML (eC_String &rkText) |
Provides string manipulation functions.
void StringOperations::EscapeXML | ( | eC_String & | rkText | ) |
Replaces all occurrences of special characters by the according XML predefined entities:
& becomes &
< becomes <
> becomes >
' becomes '
" becomes "
[in,out] | rkText | The string to be modified. |
void StringOperations::ReplaceAll | ( | eC_String & | rkText, |
const eC_String & | rkSearchText, | ||
const eC_String & | rkReplacement | ||
) |
Replaces all occurrences of a given substring by another string.
Example:
[in,out] | rkText | The string to be modified. |
[in] | rkSearchText | The string of which all occurrences ought to be replaced. |
[in] | rkReplacement | The string with which the search text is replaced. |
void StringOperations::ReplaceCharacters | ( | eC_String & | rkText, |
eC_UInt | uiPos, | ||
eC_UInt | uiLen, | ||
const eC_String & | rkReplacement | ||
) |
Replaces one or more characters in a string.
Example:
[in,out] | rkText | The string to be modified. |
[in] | uiPos | Start position at which characters are replaced. |
[in] | uiLen | Number of characters to be replaced. |
[in] | rkReplacement | Text to replace the characters with. |
StringList StringOperations::TokenizeString | ( | const eC_String & | ckString, |
const eC_Char | ccSeparator | ||
) |
Splits a string up into a list of substrings. The given separator character specifies where to split up the original string.
ckString | Original string which shall be split up into substrings |
ccSeparator | Special character which separates the individual substrings within the original string |
void StringOperations::UnescapeXML | ( | eC_String & | rkText | ) |
Replaces all occurrences of XML predefined entities by the according characters:
& becomes &
< becomes <
> becomes >
' becomes '
" becomes "
[in,out] | rkText | The string to be modified. |