|
template<typename... Args> |
static constexpr std::string | Format (std::string_view format, Args &&... args) |
| Get a formatted string similar to sprintf.
|
|
template<typename... Args> |
static constexpr std::wstring | Format (std::wstring_view format, Args &&... args) |
|
static std::string | FormatV (PRINTF_FORMAT_STRING const char *fmt, va_list args) |
|
static std::wstring | FormatV (PRINTF_FORMAT_STRING const wchar_t *fmt, va_list args) |
|
static std::string | ToUpper (std::string_view str) |
|
static std::wstring | ToUpper (std::wstring_view str) |
|
static void | ToUpper (std::string &str) noexcept |
|
static void | ToUpper (std::wstring &str) noexcept |
|
static std::string | ToLower (std::string_view str) |
|
static std::wstring | ToLower (std::wstring_view str) |
|
static void | ToLower (std::string &str) noexcept |
|
static void | ToLower (std::wstring &str) noexcept |
|
static void | ToCapitalize (std::string &str) noexcept |
|
static void | ToCapitalize (std::wstring &str) noexcept |
|
static bool | EqualsNoCase (std::string_view str1, std::string_view str2) noexcept |
|
static int | CompareNoCase (std::string_view str1, std::string_view str2, size_t n=0) noexcept |
|
static int | ReturnDigits (std::string_view str) noexcept |
|
static std::string | Left (std::string_view str, size_t count) |
|
static std::string | Mid (std::string_view str, size_t first, size_t count=std::string_view::npos) |
|
static std::string | Right (std::string_view str, size_t count) |
|
static std::string & | Trim (std::string &str) noexcept |
|
static std::string & | Trim (std::string &str, std::string_view chars) noexcept |
|
static std::string & | TrimLeft (std::string &str) noexcept |
|
static std::string & | TrimLeft (std::string &str, std::string_view chars) noexcept |
|
static std::string & | TrimRight (std::string &str) noexcept |
|
static std::string & | TrimRight (std::string &str, std::string_view chars) noexcept |
|
static std::string & | RemoveDuplicatedSpacesAndTabs (std::string &str) noexcept |
|
static bool | IsSpecialCharacter (char c) noexcept |
| Check if the character is a special character.
|
|
static std::string | ReplaceSpecialCharactersWithSpace (std::string_view str) |
|
static int | Replace (std::string &str, char oldChar, char newChar) noexcept |
|
static int | Replace (std::string &str, std::string_view oldStr, std::string_view newStr) |
|
static int | Replace (std::wstring &str, std::wstring_view oldStr, std::wstring_view newStr) |
|
static bool | StartsWith (std::string_view str1, std::string_view str2) noexcept |
|
static bool | StartsWithNoCase (std::string_view str1, std::string_view str2) noexcept |
|
static bool | EndsWith (std::string_view str1, std::string_view str2) noexcept |
|
static bool | EndsWithNoCase (std::string_view str1, std::string_view str2) noexcept |
|
template<typename CONTAINER> |
static std::string | Join (const CONTAINER &strings, std::string_view delimiter) |
|
static std::vector< std::string > | Split (std::string_view input, std::string_view delimiter, unsigned int iMaxStrings=0) |
| Splits the given input string using the given delimiter into separate strings.
|
|
static std::vector< std::string > | Split (std::string_view input, char delimiter, size_t iMaxStrings=0) |
|
static std::vector< std::string > | Split (std::string_view input, std::span< const std::string > delimiters) |
|
static std::vector< std::string > | Split (std::string_view input, std::span< const std::string_view > delimiters) |
|
template<typename OutputIt> |
static OutputIt | SplitTo (OutputIt d_first, std::string_view input, std::string_view delimiter, unsigned int iMaxStrings=0) |
| Splits the given input string using the given delimiter into separate strings.
|
|
template<typename OutputIt> |
static OutputIt | SplitTo (OutputIt d_first, std::string_view input, char delimiter, size_t iMaxStrings=0) |
|
template<typename OutputIt, typename StringLike> |
static OutputIt | SplitTo (OutputIt d_first, std::string_view input, std::span< StringLike > delimiters) |
|
static std::vector< std::string > | SplitMulti (std::span< const std::string > input, std::span< const std::string > delimiters, size_t iMaxStrings=0) |
| Splits the given input strings using the given delimiters into further separate strings.
|
|
static std::vector< std::string > | SplitMulti (std::span< const std::string_view > input, std::span< const std::string_view > delimiters, size_t iMaxStrings=0) |
|
static std::vector< std::string > | SplitMulti (std::span< const std::string > input, std::span< const std::string_view > delimiters, size_t iMaxStrings=0) |
|
static std::vector< std::string > | SplitMulti (std::span< const std::string_view > input, std::span< const std::string > delimiters, size_t iMaxStrings=0) |
|
static int | FindNumber (std::string_view strInput, std::string_view strFind) noexcept |
|
static int64_t | AlphaNumericCompare (std::wstring_view left, std::wstring_view right) noexcept |
|
static int | AlphaNumericCollation (int nKey1, const void *pKey1, int nKey2, const void *pKey2) noexcept |
|
static long | TimeStringToSeconds (std::string_view timeString) |
|
static void | RemoveCRLF (std::string &strLine) noexcept |
|
static size_t | utf8_strlen (std::string_view s) noexcept |
| utf8 version of strlen - skips any non-starting bytes in the count, thus returning the number of utf8 characters
|
|
static std::string | SecondsToTimeString (long seconds, TIME_FORMAT format=TIME_FORMAT_GUESS) |
| convert a time in seconds to a string based on the given time format
|
|
static std::string | MillisecondsToTimeString (std::chrono::milliseconds milliSeconds) |
| convert a milliseconds value to a time string in the TIME_FORMAT_HH_MM_SS format
|
|
static bool | IsNaturalNumber (std::string_view str) noexcept |
| check whether a string is a natural number. Matches [ \t]*[0-9]+[ \t]*
|
|
static bool | IsInteger (std::string_view str) noexcept |
| check whether a string is an integer. Matches [ \t]*[-]*[0-9]+[ \t]*
|
|
static bool | isasciidigit (char chr) noexcept |
|
static bool | isasciixdigit (char chr) noexcept |
|
static int | asciidigitvalue (char chr) noexcept |
|
static int | asciixdigitvalue (char chr) noexcept |
|
static bool | isasciiuppercaseletter (char chr) noexcept |
|
static bool | isasciilowercaseletter (char chr) noexcept |
|
static bool | isasciiletter (char chr) noexcept |
|
static bool | isasciialphanum (char chr) noexcept |
|
static std::string | SizeToString (int64_t size) |
|
static size_t | FindWords (std::string_view str, std::string_view wordLowerCase) noexcept |
|
static int | FindEndBracket (std::string_view str, char opener, char closer, int startPos=0) noexcept |
|
static int | DateStringToYYYYMMDD (std::string_view dateString) |
|
static std::string | ISODateToLocalizedDate (std::string_view strIsoDate) |
|
static void | WordToDigits (std::string &word) noexcept |
|
static std::string | CreateUUID () |
|
static bool | ValidateUUID (const std::string &uuid) |
|
static double | CompareFuzzy (std::string_view left, std::string_view right) noexcept |
|
static int | FindBestMatch (std::string_view str, std::span< const std::string_view > strings, double &matchscore) noexcept |
|
static int | FindBestMatch (std::string_view str, std::span< const std::string > strings, double &matchscore) noexcept |
|
static bool | ContainsKeyword (std::string_view str, std::span< const std::string_view > keywords) noexcept |
|
static bool | ContainsKeyword (std::string_view str, std::span< const std::string > keywords) noexcept |
|
static std::string | BinaryStringToString (std::string_view in) |
| Convert the string of binary chars to the actual string.
|
|
static std::string | ToHexadecimal (std::string_view in) |
|
template<typename T> |
static std::string | FormatNumber (T num) |
| Format the string with locale separators.
|
|
static std::string | Paramify (std::string param) |
| Escapes the given string to be able to be used as a parameter.
|
|
static std::string | DeParamify (std::string param) |
| Unescapes the given string.
|
|
static std::vector< std::string > | Tokenize (std::string_view input, std::string_view delimiters) |
| Split a string by the specified delimiters. Splits a string using one or more delimiting characters, ignoring empty tokens. Differs from Split() in two ways:
|
|
static void | Tokenize (std::string_view input, std::vector< std::string > &tokens, std::string_view delimiters) |
|
static std::vector< std::string > | Tokenize (std::string_view input, const char delimiter) |
|
static void | Tokenize (std::string_view input, std::vector< std::string > &tokens, const char delimiter) |
|
static uint32_t | ToUint32 (std::string_view str, uint32_t fallback=0) |
| Converts a string to a unsigned int number.
|
|
static uint64_t | ToUint64 (std::string_view str, uint64_t fallback=0) |
| Converts a string to a unsigned long long number.
|
|
static float | ToFloat (std::string_view str, float fallback=0.0f) |
| Converts a string to a float number.
|
|
static std::string | FormatFileSize (uint64_t bytes) |
|
static std::string | CreateFromCString (const char *cstr) |
| Converts a cstring pointer (const char*) to a std::string. In case nullptr is passed the result is an empty string.
|
|
static bool | Contains (std::string_view str, std::string_view keyword, bool isCaseInsensitive=true) noexcept |
| Check if a keyword string is contained on another string.
|
|