|
template<typename TNumeric > |
static TNumeric | StringToNumeric (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to a numeric value. More...
|
|
template<typename TNumeric > |
static bool | StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags=0, int base=10) |
| Convert string to a numeric value. More...
|
|
static int | StringToNonNegativeInt (const CTempString str, TStringToNumFlags flags=0) |
| Convert string to non-negative integer value. More...
|
|
static int | StringToNumeric (const string &str) |
|
static int | StringToInt (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to int. More...
|
|
static unsigned int | StringToUInt (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to unsigned int. More...
|
|
static long | StringToLong (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to long. More...
|
|
static unsigned long | StringToULong (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to unsigned long. More...
|
|
static double | StringToDoublePosix (const char *str, char **endptr=0, TStringToNumFlags flags=0) |
| Convert string to double-precision value (analog of strtod function) More...
|
|
static double | StringToDouble (const CTempStringEx str, TStringToNumFlags flags=0) |
| Convert string to double. More...
|
|
static double | StringToDoubleEx (const char *str, size_t size, TStringToNumFlags flags=0) |
| This version accepts zero-terminated string. More...
|
|
static Int8 | StringToInt8 (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to Int8. More...
|
|
static Uint8 | StringToUInt8 (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to Uint8. More...
|
|
static Uint8 | StringToUInt8_DataSize (const CTempString str, TStringToNumFlags flags=0) |
| Convert string that can contain "software" qualifiers to Uint8. More...
|
|
static Uint8 | StringToUInt8_DataSize (const CTempString str, TStringToNumFlags flags, int base) |
| Convert string to number of bytes. More...
|
|
static size_t | StringToSizet (const CTempString str, TStringToNumFlags flags=0, int base=10) |
| Convert string to size_t. More...
|
|
static const void * | StringToPtr (const CTempStringEx str, TStringToNumFlags flags=0) |
| Convert string to pointer. More...
|
|
static int | HexChar (char ch) |
| Convert character to integer. More...
|
|
template<typename TNumeric > |
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type | NumericToString (TNumeric value, TNumToStringFlags flags=0, int base=10) |
| Convert numeric value to string. More...
|
|
template<typename TStrictId > |
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, string >::type | NumericToString (TStrictId value, TNumToStringFlags flags=0, int base=10) |
|
template<typename TNumeric > |
static void | NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags=0, int base=10) |
| Convert numeric value to string. More...
|
|
static string | IntToString (int value, TNumToStringFlags flags=0, int base=10) |
| Convert int to string. More...
|
|
static string | IntToString (unsigned int value, TNumToStringFlags flags=0, int base=10) |
|
static void | IntToString (string &out_str, int value, TNumToStringFlags flags=0, int base=10) |
| Convert int to string. More...
|
|
static void | IntToString (string &out_str, unsigned int value, TNumToStringFlags flags=0, int base=10) |
|
static string | UIntToString (unsigned int value, TNumToStringFlags flags=0, int base=10) |
| Convert UInt to string. More...
|
|
static string | UIntToString (int value, TNumToStringFlags flags=0, int base=10) |
|
static void | UIntToString (string &out_str, unsigned int value, TNumToStringFlags flags=0, int base=10) |
| Convert UInt to string. More...
|
|
static void | UIntToString (string &out_str, int value, TNumToStringFlags flags=0, int base=10) |
|
static string | LongToString (long value, TNumToStringFlags flags=0, int base=10) |
| Convert Int to string. More...
|
|
static void | LongToString (string &out_str, long value, TNumToStringFlags flags=0, int base=10) |
| Convert Int to string. More...
|
|
static string | ULongToString (unsigned long value, TNumToStringFlags flags=0, int base=10) |
| Convert unsigned long to string. More...
|
|
static void | ULongToString (string &out_str, unsigned long value, TNumToStringFlags flags=0, int base=10) |
| Convert unsigned long to string. More...
|
|
static string | Int8ToString (Int8 value, TNumToStringFlags flags=0, int base=10) |
| Convert Int8 to string. More...
|
|
static void | Int8ToString (string &out_str, Int8 value, TNumToStringFlags flags=0, int base=10) |
| Convert Int8 to string. More...
|
|
static string | UInt8ToString (Uint8 value, TNumToStringFlags flags=0, int base=10) |
| Convert UInt8 to string. More...
|
|
static void | UInt8ToString (string &out_str, Uint8 value, TNumToStringFlags flags=0, int base=10) |
| Convert UInt8 to string. More...
|
|
static string | UInt8ToString_DataSize (Uint8 value, TNumToStringFlags flags=0, unsigned int max_digits=3) |
| Convert UInt8 to string using "software" qualifiers. More...
|
|
static void | UInt8ToString_DataSize (string &out_str, Uint8 value, TNumToStringFlags flags=0, unsigned int max_digits=3) |
| Convert UInt8 to string using "software" qualifiers. More...
|
|
static string | DoubleToString (double value, int precision=-1, TNumToStringFlags flags=0) |
| Convert double to string. More...
|
|
static void | DoubleToString (string &out_str, double value, int precision=-1, TNumToStringFlags flags=0) |
| Convert double to string. More...
|
|
static SIZE_TYPE | DoubleToString (double value, unsigned int precision, char *buf, SIZE_TYPE buf_size, TNumToStringFlags flags=0) |
| Convert double to string with specified precision and place the result in the specified buffer. More...
|
|
static SIZE_TYPE | DoubleToStringPosix (double value, unsigned int precision, char *buf, SIZE_TYPE buf_size) |
| Convert double to string with specified precision and put the result into a character buffer, in scientific format. More...
|
|
static SIZE_TYPE | DoubleToString_Ecvt (double value, unsigned int precision, char *buf, SIZE_TYPE buf_size, int *dec, int *sign) |
| Convert double to string with specified precision. More...
|
|
static string | SizetToString (size_t value, TNumToStringFlags flags=0, int base=10) |
| Convert size_t to string. More...
|
|
static void | PtrToString (string &out_str, const void *ptr) |
| Convert pointer to string. More...
|
|
static string | PtrToString (const void *ptr) |
| Convert pointer to string. More...
|
|
static const string | BoolToString (bool value) |
| Convert bool to string. More...
|
|
static bool | StringToBool (const CTempString str) |
| Convert string to bool. More...
|
|
static string | FormatVarargs (const char *format, va_list args) |
| Handle an arbitrary printf-style format string. More...
|
|
static int | CompareCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2) |
| Case-sensitive compare of a substring with another string. More...
|
|
static int | CompareCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2) |
| Case-sensitive compare of a substring with another string. More...
|
|
static int | CompareCase (const char *s1, const char *s2) |
| Case-sensitive compare of two strings – char* version. More...
|
|
static int | CompareCase (const CTempStringEx s1, const CTempStringEx s2) |
| Case-sensitive compare of two strings – CTempStringEx version. More...
|
|
static int | CompareNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2) |
| Case-insensitive compare of a substring with another string. More...
|
|
static int | CompareNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2) |
| Case-insensitive compare of a substring with another string. More...
|
|
static int | CompareNocase (const char *s1, const char *s2) |
| Case-insensitive compare of two strings – char* version. More...
|
|
static int | CompareNocase (const CTempStringEx s1, const CTempStringEx s2) |
| Case-insensitive compare of two strings – CTempStringEx version. More...
|
|
static int | Compare (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase) |
| Compare of a substring with another string. More...
|
|
static int | Compare (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2, ECase use_case=eCase) |
| Compare of a substring with another string. More...
|
|
static int | Compare (const char *s1, const char *s2, ECase use_case=eCase) |
| Compare two strings – char* version. More...
|
|
static int | Compare (const CTempStringEx s1, const CTempStringEx s2, ECase use_case=eCase) |
| Compare two strings – CTempStringEx version. More...
|
|
static bool | EqualCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2) |
| Case-sensitive equality of a substring with another string. More...
|
|
static bool | EqualCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2) |
| Case-sensitive equality of a substring with another string. More...
|
|
static bool | EqualCase (const char *s1, const char *s2) |
| Case-sensitive equality of two strings – char* version. More...
|
|
static bool | EqualCase (const CTempStringEx s1, const CTempStringEx s2) |
| Case-sensitive equality of two strings. More...
|
|
static bool | EqualNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2) |
| Case-insensitive equality of a substring with another string. More...
|
|
static bool | EqualNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2) |
| Case-insensitive equality of a substring with another string. More...
|
|
static bool | EqualNocase (const char *s1, const char *s2) |
| Case-insensitive equality of two strings – char* version. More...
|
|
static bool | EqualNocase (const CTempStringEx s1, const CTempStringEx s2) |
| Case-insensitive equality of two strings. More...
|
|
static bool | Equal (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase) |
| Test for equality of a substring with another string. More...
|
|
static bool | Equal (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2, ECase use_case=eCase) |
| Test for equality of a substring with another string. More...
|
|
static bool | Equal (const char *s1, const char *s2, ECase use_case=eCase) |
| Test for equality of two strings – char* version. More...
|
|
static bool | Equal (const CTempStringEx s1, const CTempStringEx s2, ECase use_case=eCase) |
| Test for equality of two strings. More...
|
|
static int | strcmp (const char *s1, const char *s2) |
| String compare. More...
|
|
static int | strncmp (const char *s1, const char *s2, size_t n) |
| String compare up to specified number of characters. More...
|
|
static int | strcasecmp (const char *s1, const char *s2) |
| Case-insensitive comparison of two zero-terminated strings. More...
|
|
static int | strncasecmp (const char *s1, const char *s2, size_t n) |
| Case-insensitive comparison of two zero-terminated strings, narrowed to the specified number of characters. More...
|
|
static size_t | strftime (char *s, size_t maxsize, const char *format, const struct tm *timeptr) |
| Wrapper for the function strftime() that corrects handling D and T time formats on MS Windows. More...
|
|
static bool | MatchesMask (CTempString str, CTempString mask, ECase use_case=eCase) |
| Match "str" against the "mask". More...
|
|
static bool | IsBlank (const CTempString str, SIZE_TYPE pos=0) |
| Check if a string is blank (has no text). More...
|
|
static bool | IsLower (const CTempString str) |
| Checks if all letters in the given string have a lower case. More...
|
|
static bool | IsUpper (const CTempString str) |
| Checks if all letters in the given string have a upper case. More...
|
|
static string & | ToLower (string &str) |
| Convert string to lower case – string& version. More...
|
|
static char * | ToLower (char *str) |
| Convert string to lower case – char* version. More...
|
|
static string & | ToUpper (string &str) |
| Convert string to upper case – string& version. More...
|
|
static char * | ToUpper (char *str) |
| Convert string to upper case – char* version. More...
|
|
static bool | StartsWith (const CTempString str, const CTempString start, ECase use_case=eCase) |
| Check if a string starts with a specified prefix value. More...
|
|
static bool | StartsWith (const CTempString str, char start, ECase use_case=eCase) |
| Check if a string starts with a specified character value. More...
|
|
static bool | EndsWith (const CTempString str, const CTempString end, ECase use_case=eCase) |
| Check if a string ends with a specified suffix value. More...
|
|
static bool | EndsWith (const CTempString str, char end, ECase use_case=eCase) |
| Check if a string ends with a specified character value. More...
|
|
static SIZE_TYPE | CommonPrefixSize (const CTempString s1, const CTempString s2) |
| Determine the common prefix of two strings. More...
|
|
static SIZE_TYPE | CommonSuffixSize (const CTempString s1, const CTempString s2) |
| Determine the common suffix of two strings. More...
|
|
static SIZE_TYPE | CommonOverlapSize (const CTempString s1, const CTempString s2) |
| Determine if the suffix of one string is the prefix of another. More...
|
|
static SIZE_TYPE | Find (const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0) |
| Find the pattern in the string. More...
|
|
static SIZE_TYPE | Find (const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst, ECase use_case=eCase) |
| Find the pattern in the specified range of a string. More...
|
|
static SIZE_TYPE | Find (const CTempString str, const CTempString pattern, SIZE_TYPE start) |
| Wrapper for backward-compatibility. More...
|
|
static SIZE_TYPE | FindCase (const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst) |
| Find the pattern in the specified range of a string using a case sensitive search. More...
|
|
static SIZE_TYPE | FindCase (const CTempString str, const CTempString pattern) |
| Wrappers for backward-compatibility. More...
|
|
static SIZE_TYPE | FindCase (const CTempString str, const CTempString pattern, SIZE_TYPE start) |
|
static SIZE_TYPE | FindNoCase (const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst) |
| Find the pattern in the specified range of a string using a case insensitive search. More...
|
|
static SIZE_TYPE | FindNoCase (const CTempString str, const CTempString pattern) |
| Wrapper for backward-compatibility. More...
|
|
static SIZE_TYPE | FindNoCase (const CTempString str, const CTempString pattern, SIZE_TYPE start) |
|
static const string * | Find (const list< string > &lst, const CTempString val, ECase use_case=eCase) |
| Test for presence of a given string in a list or vector of strings. More...
|
|
static const string * | FindCase (const list< string > &lst, const CTempString val) |
|
static const string * | FindNoCase (const list< string > &lst, const CTempString val) |
|
static const string * | Find (const vector< string > &vec, const CTempString val, ECase use_case=eCase) |
|
static const string * | FindCase (const vector< string > &vec, const CTempString val) |
|
static const string * | FindNoCase (const vector< string > &vec, const CTempString val) |
|
static SIZE_TYPE | FindWord (const CTempString str, const CTempString word, ECase use_case=eCase, EDirection direction=eForwardSearch) |
| Find given word in the string. More...
|
|
static SIZE_TYPE | FindWord (const CTempString str, const CTempString word, EOccurrence which, ECase use_case=eCase) |
| Find given word in the string. More...
|
|
static string | TruncateSpaces (const string &str, ETrunc where=eTrunc_Both) |
| Truncate whitespace in a string. More...
|
|
static CTempString | TruncateSpaces_Unsafe (const CTempString str, ETrunc where=eTrunc_Both) |
| Truncate whitespace in a string. More...
|
|
static CTempString | TruncateSpaces (const CTempString str, ETrunc where=eTrunc_Both) |
|
static CTempString | TruncateSpaces (const char *str, ETrunc where=eTrunc_Both) |
|
static void | TruncateSpacesInPlace (string &str, ETrunc where=eTrunc_Both) |
| Truncate whitespace in a string (in-place) More...
|
|
static void | TruncateSpacesInPlace (CTempString &, ETrunc where=eTrunc_Both) |
|
static void | TrimPrefixInPlace (string &str, const CTempString prefix, ECase use_case=eCase) |
| Trim prefix from a string (in-place) More...
|
|
static void | TrimPrefixInPlace (CTempString &str, const CTempString prefix, ECase use_case=eCase) |
|
static CTempString | TrimPrefix_Unsafe (const CTempString str, const CTempString prefix, ECase use_case=eCase) |
| Trim prefix from a string. More...
|
|
static void | TrimSuffixInPlace (string &str, const CTempString suffix, ECase use_case=eCase) |
| Trim suffix from a string (in-place) More...
|
|
static void | TrimSuffixInPlace (CTempString &str, const CTempString suffix, ECase use_case=eCase) |
|
static CTempString | TrimSuffix_Unsafe (const CTempString str, const CTempString suffix, ECase use_case=eCase) |
| Trim suffix from a string. More...
|
|
static string & | Replace (const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0) |
| Replace occurrences of a substring within a string. More...
|
|
static string | Replace (const string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0) |
| Replace occurrences of a substring within a string and returns the result as a new string. More...
|
|
static string & | ReplaceInPlace (string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0) |
| Replace occurrences of a substring within a string. More...
|
|
static list< string > & | Split (const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL) |
| Split a string using specified delimiters. More...
|
|
static vector< string > & | Split (const CTempString str, const CTempString delim, vector< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL) |
|
static list< CTempString > & | Split (const CTempString str, const CTempString delim, list< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static vector< CTempString > & | Split (const CTempString str, const CTempString delim, vector< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static list< CTempStringEx > & | Split (const CTempString str, const CTempString delim, list< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static vector< CTempStringEx > & | Split (const CTempString str, const CTempString delim, vector< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static bool | SplitInTwo (const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0) |
| Split a string into two pieces using the specified delimiters. More...
|
|
static bool | SplitInTwo (const CTempString str, const CTempString delim, CTempString &str1, CTempString &str2, TSplitFlags flags=0, CTempString_Storage *storage=NULL) |
|
static bool | SplitInTwo (const CTempString str, const CTempString delim, CTempStringEx &str1, CTempStringEx &str2, TSplitFlags flags=0, CTempString_Storage *storage=NULL) |
|
static list< string > & | SplitByPattern (const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL) |
| Variation of Split() with fSplit_ByPattern flag applied by default. More...
|
|
static vector< string > & | SplitByPattern (const CTempString str, const CTempString delim, vector< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL) |
|
static list< CTempString > & | SplitByPattern (const CTempString str, const CTempString delim, list< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static vector< CTempString > & | SplitByPattern (const CTempString str, const CTempString delim, vector< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static list< CTempStringEx > & | SplitByPattern (const CTempString str, const CTempString delim, list< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
static vector< CTempStringEx > & | SplitByPattern (const CTempString str, const CTempString delim, vector< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL) |
|
template<typename TContainer > |
static string | Join (const TContainer &arr, const CTempString &delim) |
| Join strings using the specified delimiter. More...
|
|
template<typename TValue > |
static string | Join (const initializer_list< TValue > &arr, const CTempString &delim) |
|
template<typename TInputIterator > |
static string | Join (TInputIterator from, TInputIterator to, const CTempString &delim) |
|
template<typename TInputIterator > |
static string | JoinNumeric (TInputIterator from, TInputIterator to, const CTempString &delim) |
|
template<typename TIterator , typename FTransform > |
static string | TransformJoin (TIterator from, TIterator to, const CTempString &delim, FTransform fnTransform) |
|
static string | PrintableString (const CTempString str, TPrintableMode mode=fNewLine_Quote|fNonAscii_Passthru) |
| Get a printable version of the specified string. More...
|
|
static string | Escape (const CTempString str, const CTempString metacharacters, char escape_char='\\') |
| Escape string (generic version). More...
|
|
static string | Unescape (const CTempString str, char escape_char='\\') |
| Unescape string (generic version). More...
|
|
static string | Quote (const CTempString str, char quote_char='"', char escape_char = '\\') |
| Quote string (generic version). More...
|
|
static string | Unquote (const CTempString str, char escape_char='\\') |
| Unquote string (generic version). More...
|
|
static string | Sanitize (CTempString str, TSS_Flags flags=fSS_print) |
| Sanitize a string, allowing only specified classes of characters. More...
|
|
static string | Sanitize (CTempString str, CTempString allow_chars, CTempString reject_chars, char reject_replacement=' ', TSS_Flags flags=0) |
| Sanitize a string, allowing only specified characters or character classes. More...
|
|
static string | ParseEscapes (const CTempString str, EEscSeqRange mode=eEscSeqRange_Standard, char user_char='?') |
| Parse C-style escape sequences in the specified string. More...
|
|
static string | ParseQuoted (const CTempString str, size_t *n_read=NULL) |
| Discard C-style backslash escapes and extract a quoted string. More...
|
|
static string | CEncode (const CTempString str, EQuoted quoted=eQuoted) |
| Encode a string for C/C++. More...
|
|
static string | CParse (const CTempString str, EQuoted quoted=eQuoted) |
| Discard C-style backslash escapes. More...
|
|
static string | JavaScriptEncode (const CTempString str) |
| Encode a string for JavaScript. More...
|
|
static string | XmlEncode (const CTempString str, TXmlEncode flags=eXmlEnc_Contents) |
| Encode a string for XML. More...
|
|
static string | HtmlEncode (const CTempString str, THtmlEncode flags=fHtmlEnc_EncodeAll) |
| Encode a string for HTML. More...
|
|
static string | HtmlDecode (const CTempString str, EEncoding encoding=eEncoding_Unknown, THtmlDecode *result_flags=NULL) |
| Decode HTML entities and character references. More...
|
|
static string | HtmlEntity (TUnicodeSymbol uch) |
| Returns HTML entity name for this symbol if one exists (without leading ampersand and trailing semicolon); or empty string if suitable HTML entity was not found. More...
|
|
static string | JsonEncode (const CTempString str, EJsonEncode encoding=eJsonEnc_UTF8) |
| Encode a string for JSON. More...
|
|
static string | JsonDecode (const CTempString str, size_t *n_read=NULL) |
| Decode a string encoded by JsonEncode. More...
|
|
static string | ShellEncode (const string &str) |
| Quotes a string in Bourne Again Shell (BASH) syntax, in a way that disallows non-printable characters in the result. More...
|
|
static string | URLEncode (const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars) |
| URL-encode string. More...
|
|
static CStringUTF8 | SQLEncode (const CStringUTF8 &str, ESqlEncode flag) |
| SQL-encode string. More...
|
|
static CStringUTF8 | SQLEncode (const CStringUTF8 &str) |
|
static string | URLDecode (const CTempString str, EUrlDecode flag=eUrlDec_All) |
| URL-decode string. More...
|
|
static void | URLDecodeInPlace (string &str, EUrlDecode flag=eUrlDec_All) |
| URL-decode string to itself. More...
|
|
static bool | NeedsURLEncoding (const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars) |
| Check if the string needs the requested URL-encoding. More...
|
|
static string | Base64Encode (const CTempString str, size_t line_len=0) |
| Base64-encode string. More...
|
|
static string | Base64Decode (const CTempString str) |
| Base64-decode string. More...
|
|
static bool | IsIPAddress (const CTempStringEx str) |
| Check if the string contains a valid IP address. More...
|
|
template<typename _D > |
static void | WrapIt (const string &str, SIZE_TYPE width, _D &dest, TWrapFlags flags=0, const string *prefix=0, const string *prefix1=0) |
| Wrap the specified string into lines of a specified width. More...
|
|
static void | Wrap (const string &str, SIZE_TYPE width, IWrapDest &dest, TWrapFlags flags, const string *prefix, const string *prefix1) |
|
static list< string > & | Wrap (const string &str, SIZE_TYPE width, list< string > &arr, TWrapFlags flags=0, const string *prefix=0, const string *prefix1=0) |
|
static list< string > & | Wrap (const string &str, SIZE_TYPE width, list< string > &arr, TWrapFlags flags, const string &prefix, const string *prefix1=0) |
|
static list< string > & | Wrap (const string &str, SIZE_TYPE width, list< string > &arr, TWrapFlags flags, const string &prefix, const string &prefix1) |
|
static list< string > & | WrapList (const list< string > &l, SIZE_TYPE width, const string &delim, list< string > &arr, TWrapFlags flags=0, const string *prefix=0, const string *prefix1=0) |
| Wrap the list using the specified criteria. More...
|
|
static list< string > & | WrapList (const list< string > &l, SIZE_TYPE width, const string &delim, list< string > &arr, TWrapFlags flags, const string &prefix, const string *prefix1=0) |
|
static list< string > & | WrapList (const list< string > &l, SIZE_TYPE width, const string &delim, list< string > &arr, TWrapFlags flags, const string &prefix, const string &prefix1) |
|
static list< string > & | Justify (const CTempString str, SIZE_TYPE width, list< string > &par, const CTempString *pfx=0, const CTempString *pfx1=0) |
| Justify the specified string into a series of lines of the same width. More...
|
|
static list< string > & | Justify (const CTempString str, SIZE_TYPE width, list< string > &par, const CTempString pfx, const CTempString *pfx1=0) |
|
static list< string > & | Justify (const CTempString str, SIZE_TYPE width, list< string > &par, const CTempString pfx, const CTempString pfx1) |
|
static string | Dedent (const CTempString str, TDedentFlags flags=0) |
| Dedent multi-line string, removing common whitespace prefix for each line. More...
|
|
static string | DedentR (const CTempString str) |
|
static string | GetField (const CTempString str, size_t field_no, const CTempString delimiters, EMergeDelims merge=eNoMergeDelims) |
| Search for a field. More...
|
|
static string | GetField (const CTempString str, size_t field_no, char delimiter, EMergeDelims merge=eNoMergeDelims) |
| Search for a field. More...
|
|
static CTempString | GetField_Unsafe (const CTempString str, size_t field_no, const CTempString delimiters, EMergeDelims merge=eNoMergeDelims) |
| Search for a field. More...
|
|
static CTempString | GetField_Unsafe (const CTempString str, size_t field_no, char delimiter, EMergeDelims merge=eNoMergeDelims) |
| Search for a field. More...
|
|
|
static void | ToLower (const char *) |
| Privatized ToLower() with const char* parameter to prevent passing of constant strings. More...
|
|
static void | ToUpper (const char *) |
| Privatized ToUpper() with const char* parameter to prevent passing of constant strings. More...
|
|
static bool | x_ReportLimitsError (const CTempString str, TStringToNumFlags flags) |
|
template<typename TNumeric , typename TSource > |
static bool | x_VerifyIntLimits (TSource v, const CTempString str, TStringToNumFlags flags) |
|
template<typename TNumeric , typename TSource > |
static bool | x_VerifyFloatLimits (TSource v, const CTempString str, TStringToNumFlags flags) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)< sizeof(int)), TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)< sizeof(unsigned int)), TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)==sizeof(int) &&!is_same< TNumeric, long >::value), TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)==sizeof(unsigned int) &&!is_same< TNumeric, unsigned long >::value), TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_same< TNumeric, long >::value, TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_same< TNumeric, unsigned long >::value, TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)==sizeof(Int8) &&!is_same< TNumeric, long >::value), TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)==sizeof(Uint8) &&!is_same< TNumeric, unsigned long >::value), TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TStrictId > |
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, TStrictId >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_same< TNumeric, float >::value, TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int) |
|
template<typename TNumeric > |
static enable_if< is_same< TNumeric, double >::value, TNumeric >::type | x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)< sizeof(int)), bool >::type | x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)< sizeof(unsigned int)), bool >::type | x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)==sizeof(int) &&!is_same< TNumeric, long >::value), bool >::type | x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)==sizeof(unsigned int) &&!is_same< TNumeric, unsigned long >::value), bool >::type | x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base) |
|
static bool | x_StringToNumeric (const CTempString str, long *value, TStringToNumFlags flags, int base) |
|
static bool | x_StringToNumeric (const CTempString str, unsigned long *value, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)==sizeof(Int8) &&!is_same< TNumeric, long >::value), bool >::type | x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)==sizeof(Uint8) &&!is_same< TNumeric, unsigned long >::value), bool >::type | x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base) |
|
static bool | x_StringToNumeric (const CTempString str, float *value, TStringToNumFlags flags, int) |
|
static bool | x_StringToNumeric (const CTempString str, double *value, TStringToNumFlags flags, int) |
|
template<typename TStrictId > |
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, bool >::type | x_StringToNumeric (const CTempString str, TStrictId *value, TStringToNumFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)<=sizeof(int) &&!is_same< TNumeric, long >::value), void >::type | x_NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)<=sizeof(unsigned int) &&!is_same< TNumeric, unsigned long >::value), void >::type | x_NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags, int base) |
|
static void | x_NumericToString (string &out_str, long value, TNumToStringFlags flags, int base) |
|
static void | x_NumericToString (string &out_str, unsigned long value, TNumToStringFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)==sizeof(Int8) &&!is_same< TNumeric, long >::value), void >::type | x_NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_integral< TNumeric >::value &&is_unsigned< TNumeric >::value &&(sizeof(TNumeric)==sizeof(Uint8) &&!is_same< TNumeric, unsigned long >::value), void >::type | x_NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags, int base) |
|
template<typename TNumeric > |
static enable_if< is_floating_point< TNumeric >::value, void >::type | x_NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags, int) |
|
template<typename TStrictId > |
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, void >::type | x_NumericToString (string &out_str, TStrictId value, TNumToStringFlags flags, int base) |
|
template<typename TIterator > |
static string | xx_Join (TIterator from, TIterator to, const CTempString &delim) |
|
template<typename TIterator > |
static enable_if< is_same< typename TIterator::iterator_category, input_iterator_tag >::value &&is_convertible< typename TIterator::value_type, string >::value, string >::type | x_Join (TIterator from, TIterator to, const CTempString &delim) |
|
template<typename TIterator > |
static enable_if< is_convertible< typename TIterator::iterator_category, forward_iterator_tag >::value &&is_convertible< typename TIterator::value_type, string >::value, string >::type | x_Join (TIterator from, TIterator to, const CTempString &delim) |
|
template<typename TValue > |
static enable_if< is_convertible< TValue, string >::value, string >::type | x_Join (TValue *from, TValue *to, const CTempString &delim) |
|
template<typename TIterator > |
static enable_if< is_convertible< typename TIterator::iterator_category, input_iterator_tag >::value &&is_arithmetic< typename TIterator::value_type >::value, string >::type | x_Join (TIterator from, TIterator to, const CTempString &delim) |
|
template<typename TValue > |
static enable_if< is_arithmetic< TValue >::value, string >::type | x_Join (TValue *from, TValue *to, const CTempString &delim) |
|