|
| template<class T> |
| static int | length (T *pString) |
| | Count characters before the null terminator.
|
| template<class T> |
| static int | find (T *pString, T pCharSearch, int begin=0) |
| | Find a character in a null-terminated string.
|
| template<class T> |
| static int | find (T *pString, T *pKeySearch, int begin=0) |
| | Find a substring in a null-terminated string.
|
| template<class T> |
| static void | trimleft (T *pString) |
| | Remove leading whitespace characters from a mutable string.
|
| template<class T> |
| static void | trimright (T *pString) |
| | Remove trailing whitespace characters from a mutable string.
|
| template<class T> |
| static void | trimleft (T *pString, T delChar) |
| | Remove leading occurrences of a character.
|
| template<class T> |
| static void | trimright (T *pString, T delChar) |
| | Remove trailing occurrences of a character.
|
| template<class T> |
| static void | trim (T *pString) |
| | Remove leading and trailing whitespace characters.
|
| template<class T> |
| static void | trim (T *pString, T delChar) |
| | Remove leading and trailing occurrences of a character.
|
| template<class T> |
| static int | countEntry (T *pString, T entry, int begin=0) |
| | Count occurrences of a character.
|
| template<class T1, class T2> |
| static int | copy (T1 *pStringDst, T2 *pStringSrc) |
| | Copy a null-terminated string while converting character type.
|
| template<class T1, class T2> |
| static int | copyAt (T1 *pStringDst, T2 *pStringSrc, int at) |
| | Copy a source string into a destination string at an index.
|
| template<class T1, class T2> |
| static int | cat (T1 *pStringDst, T2 *pStringSrc) |
| | Append a source string to a destination string.
|
| template<class T> |
| static int | comp (T *pString1, T *pString2) |
| | Compare two null-terminated strings by raw character bytes.
|
| template<class T> |
| static int | comp (T *pString1, T *pString2, int len) |
| | Compare a fixed number of characters by raw character bytes.
|
| template<class T1, class T2> |
| static int | mid (T1 *pStringDst, T2 *pStringSrc, int begin, int end) |
| | Copy a substring range.
|
| template<class T1, class T2> |
| static int | getBlock (T1 *pStringDst, T2 *pStringSrc, T2 *pBlock, int begin=0) |
| | Extract text between two occurrences of the same delimiter.
|
| template<class T1, class T2> |
| static int | findBlock (T1 *pStringDst, T2 *pStringSrc, T2 *pBlock, int begin=0) |
| | Extract text from a balanced block such as {} or [].
|
| template<class T1, class T2> |
| static int | findBlockString (T1 *pStringDst, T2 *pStringSrc, T2 *pBlock1, T2 *pBlock2, int begin=0) |
| | Extract text from a balanced block with string begin/end markers.
|
| template<class T> |
| static void | inorgeLoopChar (T *pString, T charLoop) |
| | Collapse repeated occurrences of a character to a single occurrence.
|
| template<class T> |
| static bool | split (T *lpStrResult, const T *lpStringSearch, const T *lpStrSplit, int *pos) |
| | Split a string incrementally using any character from a delimiter set.
|
| static int | splitString (const char *stringSplit, const char *search, std::vector< std::string > &result) |
| | Split a narrow string into a vector.
|
| static std::string | replaceAll (std::string &string, const std::string &from, const std::string &to) |
| | Replace every occurrence of a substring.
|
| static int | splitString (const wchar_t *stringSplit, const wchar_t *search, std::vector< std::wstring > &result) |
| | Split a wide string into a vector.
|
| static bool | format (char *lpString, const char *lpStringFormat,...) |
| | Format text into a caller-provided buffer.
|
| template<class T> |
| static bool | parseToInt (T *lpString, int *result) |
| | Parse a signed integer from a string.
|
| template<class T> |
| static bool | parseToFloat (T *lpString, float *result) |
| | Parse a floating-point value from a string.
|
| template<class T> |
| static bool | parseToUInt (T *lpString, int *result) |
| | Parse an unsigned integer from a string.
|
| template<class T> |
| static bool | parseFromHex (T *lpString, int *result) |
| | Parse a hexadecimal integer from a string.
|
|
template<class T> |
| static void | toLower (T *lpString) |
| | Convert a mutable string to lowercase in place.
|
|
template<class T> |
| static void | toUpper (T *lpString) |
| | Convert a mutable string to uppercase in place.
|
| template<class T1, class T2> |
| static void | getFolderPath (T1 *dstString, T2 *lpString) |
| | Extract the folder path from a file path.
|
| template<class T1, class T2> |
| static void | getFileName (T1 *dstString, T2 *lpString) |
| | Extract the file name from a path.
|
| template<class T1, class T2> |
| static void | getFileNameExt (T1 *dstString, T2 *lpString) |
| | Extract the file extension from a path.
|
| template<class T1, class T2> |
| static void | getFileNameNoExt (T1 *dstString, T2 *lpString) |
| | Extract the file name without extension from a path.
|
| template<class T> |
| static void | shortName (T *dest, const T *name, int maxchar) |
| | Shorten a name to a maximum character count.
|
| template<class T> |
| static void | replaceText (T *result, const T *string, const T *search, const T *replace) |
| | Replace all occurrences of text in a source buffer.
|
| static wchar_t | utf8Char2Unicode (const char *&str) |
| | Decode one UTF-8 character and advance the source pointer.
|
| static unsigned short * | getUnicodeString (const wchar_t *src) |
| | Convert a wide string to an unsigned 16-bit Unicode buffer.
|
| static void | convertUTF8ToUnicode (const char *src, wchar_t *dst) |
| | Convert UTF-8 text to a wide-character buffer.
|
| static int | getUnicodeStringSize (const char *src) |
| | Calculate the wide-character length required for a UTF-8 string.
|
| static void | convertUnicodeToUTF8 (const wchar_t *src, char *dst) |
| | Convert wide-character text to UTF-8.
|
| static int | getUTF8StringSize (const wchar_t *src) |
| | Calculate the UTF-8 byte length required for a wide string.
|
| static void | replaceExt (char *lpPath, const char *lpExt) |
| | Replace the extension portion of a file name in place.
|
| static void | replacePathExt (char *lpPath, const char *lpExt) |
| | Replace the extension portion of a full path in place.
|
| static int | findStringInList (std::vector< std::string > &listString, const char *find) |
| | Find a string in a vector.
|
| static void | replaceString (std::string &subject, const std::string &search, const std::string &replace) |
| | Replace all occurrences of a substring in a std::string.
|
| static const std::string & | convertUnicodeToUTF8 (const wchar_t *src) |
| | Convert wide-character text to UTF-8 using shared temporary storage.
|
| static const std::wstring & | convertUTF8ToUnicode (const char *src) |
| | Convert UTF-8 text to wide-character text using shared temporary storage.
|
| static const std::string & | toLower (const std::string &s) |
| | Return a lowercase copy of a narrow string.
|
| static const std::wstring & | toLower (const std::wstring &s) |
| | Return a lowercase copy of a wide string.
|
| static const std::string & | toUpper (const std::string &s) |
| | Return an uppercase copy of a narrow string.
|
| static const std::wstring & | toUpper (const std::wstring &s) |
| | Return an uppercase copy of a wide string.
|
| static const std::string & | formatThousand (int n, bool useK, bool useM) |
| | Format a number with thousand separators or compact suffixes.
|
Low-level string helper functions used by engine utilities.
Most template functions operate on null-terminated mutable buffers and assume the destination buffer is large enough for the result. Functions returning const std::string& or const std::wstring& use shared temporary storage and should be copied before the next call that may reuse that storage.