20 #ifndef COIL_STRINGUTIL_H
21 #define COIL_STRINGUTIL_H
28 #if defined(Cygwin) && ( __GNUC__ < 4 )
31 typedef basic_string<wchar_t> wstring;
117 void toLower(std::string& str);
170 bool isEscaped(
const std::string& str, std::string::size_type pos);
204 std::string
escape(
const std::string str);
242 std::string
unescape(
const std::string str);
374 unsigned int replaceString(std::string& str,
const std::string from,
375 const std::string to);
401 const std::string& delimiter,
402 bool ignore_empty =
false);
432 bool toBool(std::string str, std::string yes, std::string no,
433 bool default_value =
true);
458 bool ignore_case =
true);
483 bool includes(
const std::string& list, std::string value,
484 bool ignore_case =
true);
542 bool isURL(
const std::string& str);
565 template <
class Pr
intable>
568 std::stringstream str_stream;
570 return str_stream.str();
596 template <
typename To>
599 if (str == 0) {
return false; }
602 if ((s << str).fail()) {
return false; }
603 if ((s >> val).fail()) {
return false; }
631 bool stringTo<std::string>(std::string& val,
const char* str);
730 std::string
sprintf(
char const * __restrict fmt, ...);
733 #endif // COIL_STRINGUTIL_H