3#ifndef ICE_STRING_UTIL_H
4#define ICE_STRING_UTIL_H
40 ICE_API std::string escapeString(std::string_view s, std::string_view special,
Ice::ToStringMode toStringMode);
46 ICE_API std::string unescapeString(
48 std::string_view::size_type,
49 std::string_view::size_type,
50 std::string_view special);
56 ICE_API
bool splitString(std::string_view, std::string_view, std::vector<std::string>&);
61 ICE_API std::string joinString(
const std::vector<std::string>&, std::string_view delimiter);
66 ICE_API std::string trim(std::string_view);
75 ICE_API std::string::size_type checkQuote(
const std::string&, std::string::size_type = 0);
83 ICE_API
bool match(
const std::string&,
const std::string&,
bool =
false);
88 ICE_API std::string lastErrorToString();
90 using ErrorCode =
unsigned long;
91 ICE_API std::string errorToStringWithSource(ErrorCode error,
const void* source);
92 inline std::string errorToString(ErrorCode error) {
return errorToStringWithSource(error,
nullptr); }
94 using ErrorCode = int;
95 ICE_API std::string errorToString(
int);
103 ICE_API std::string toLower(std::string_view);
104 ICE_API std::string toUpper(std::string_view);
105 ICE_API
bool isAlpha(
char);
106 ICE_API
bool isDigit(
char);
111 ICE_API std::string removeWhitespace(std::string_view);
ToStringMode
The output mode for xxxToString methods such as identityToString and proxyToString.
@ Compat
Characters with ordinal values greater than 127 are encoded as a sequence of UTF-8 bytes using octal ...
@ Unicode
Characters with ordinal values greater than 127 are kept as-is in the resulting string.
@ ASCII
Characters with ordinal values greater than 127 are encoded as universal character names in the resul...