9 #ifndef _STRUS_STRING_CONV_HPP_INCLUDED
10 #define _STRUS_STRING_CONV_HPP_INCLUDED
102 static std::string
tolower(
const std::string& str)
109 static std::string
tolower(
const char* str, std::size_t strsize)
116 static std::string
trim(
const std::string& str)
123 static std::string
trim(
const char* str, std::size_t strsize)
126 std::string rt =
strus::trim( str, strsize, errcode);
130 static std::string
unescape(
const std::string& str)
bool stringStartsWith(const std::string &val, const std::string &prefix)
Test prefix on equality.
Definition: string_conv.hpp:18
static std::string unescape(const std::string &str)
Definition: string_conv.hpp:130
Inlined version of string conversion functions throwing an exception instead of setting an error code...
Definition: string_conv.hpp:100
std::runtime_error stringconv_exception(StringConvError errcode)
Convert string conversion error code into an exception.
static std::string trim(const char *str, std::size_t strsize)
Definition: string_conv.hpp:123
std::string trim(const std::string &val, StringConvError &err)
Trim trailing and heading whitespace and control characters.
StringConvError
Definition: string_conv.hpp:16
std::string utf8clean(const std::string &name, StringConvError &err)
Convert possibly broken UTF-8 to valid UTF-8.
Definition: string_conv.hpp:19
bool caseInsensitiveStartsWith(const std::string &val, const std::string &prefix)
Test prefix on Ascii letter caseinsensitive equality.
std::string tolower(const char *val, StringConvError &err)
Convert ASCII letters in string to lowercase.
std::string unescape(const std::string &val, StringConvError &err)
Convert excaped control characters to their unescaped form (e.g. \n to )
static std::string tolower(const char *str, std::size_t strsize)
Definition: string_conv.hpp:109
Definition: string_conv.hpp:17
bool caseInsensitiveEquals(const std::string &val1, const std::string &val2)
Compare on Ascii letter caseinsensitive equality.
static std::string trim(const std::string &str)
Definition: string_conv.hpp:116
static std::string tolower(const std::string &str)
Definition: string_conv.hpp:102
bool isEmptyString(const char *val, std::size_t size)
Evaluate if a string is empty or contains only space characters.