static std::string trim(const std::string &text)
Trim whitespace from front and back.
ByteOrderMark
Unicode byte order mark (BOM) types.
Definition: text.h:36
static std::string from_utf16(const std::wstring &s)
Convert from UTF-16 to UTF-8.
static std::string from_wchar(wchar_t value)
Convert UCS-2 code point to UTF-8.
static bool parse_bool(const std::string &value)
static std::string to_upper(const std::string &s)
Convert text to uppercase.
static float parse_float(const std::string &value)
static std::string to_lower(const std::string &s)
Convert text to lowercase.
static double parse_double(const std::string &value)
static std::string to_string(unsigned char value, int base=10, bool uppercase=false)
Formats a number.
Definition: text.h:87
static std::string::size_type char_length(const std::string &str)
Finds the number of characters in a UTF-8 string.
static int parse_int32(const std::string &value, int base=10)
static std::string from_utf32(unsigned int value)
Convert Unicode code point to UTF-8.
static unsigned long long parse_uint64(const std::string &value, int base=10)
static std::string to_string(short value, int base=10, bool uppercase=false)
Definition: text.h:92
static ByteOrderMark detect_bom(const void *data, std::string::size_type length)
Searches for a byte order mark.
static unsigned int parse_uint32(const std::string &value, int base=10)
Parse a number.
static std::wstring to_utf16(const std::string &s)
Convert from UTF-8 to UTF-16.
static std::vector< std::string > split(const std::string &text, const std::string &split_string, bool skip_empty=true)
Split text into a list.
static long long parse_int64(const std::string &value, int base=10)
static std::string to_string(unsigned short value, int base=10, bool uppercase=false)
Definition: text.h:88
static std::string remove_trailing_zeros(std::string text)
Removes trailing zeros from floating point numbers.
Definition: Application/application.h:35
static bool equal_caseless(const std::string &a, const std::string &b)
Returns true if equal when doing a character case-insensitive comparison.
static std::string to_string(char value, int base=10, bool uppercase=false)
Definition: text.h:91
static bool less_caseless(const std::string &a, const std::string &b)
Returns true if less when doing a character case-insensitive comparison.
Text string functions.
Definition: text.h:47