15[[nodiscard]]
bool contains(std::string_view s,
char c);
25[[nodiscard]]
bool matches(std::string_view in, std::string_view search);
27[[nodiscard]]
bool iequals(std::string_view s1, std::string_view s2);
29void ltrim(std::string& s);
31[[nodiscard]] std::string_view
ltrim(std::string_view s);
33void rtrim(std::string& s);
35[[nodiscard]] std::string_view
rtrim(std::string_view s);
37void trim(std::string& s);
39[[nodiscard]] std::string_view
trim(std::string_view s);
43[[nodiscard]] std::string
trimInternal(std::string_view s);
45void ltrim(std::string& s, std::string_view chars);
47[[nodiscard]] std::string_view
ltrim(std::string_view s, std::string_view chars);
49void rtrim(std::string& s, std::string_view chars);
51[[nodiscard]] std::string_view
rtrim(std::string_view s, std::string_view chars);
53void trim(std::string& s, std::string_view chars);
55[[nodiscard]] std::string_view
trim(std::string_view s, std::string_view chars);
57void trimInternal(std::string& s, std::string_view chars);
59[[nodiscard]] std::string
trimInternal(std::string_view s, std::string_view chars);
61[[nodiscard]] std::vector<std::string>
split(std::string_view s,
char delim);
63void toLower(std::string& input);
65[[nodiscard]] std::string
toLower(std::string_view input);
67void toUpper(std::string& input);
69[[nodiscard]] std::string
toUpper(std::string_view input);
71[[nodiscard]] std::string
createRandom(uint16_t length = 32, std::string_view chars =
"0123456789_abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ");
75[[nodiscard]] std::string
padNumber(int64_t number,
int width);
77void normalizeSlashes(std::string& path,
bool stripSlashPrefix =
false,
bool stripSlashSuffix =
true);
79void denormalizeSlashes(std::string& path,
bool stripSlashPrefix =
false,
bool stripSlashSuffix =
true);
81std::from_chars_result
toBool(std::string_view number,
bool& out,
int base = 10);
83std::from_chars_result
toInt(std::string_view number, std::integral
auto& out,
int base = 10) {
84 return std::from_chars(number.data(), number.data() + number.size(), out, base);
87std::from_chars_result
toFloat(std::string_view number, std::floating_point
auto& out) {
90 out = std::stof(std::string{number});
91 return {number.data(), {}};
93 return std::from_chars(number.data(), number.data() + number.size(), out);
97[[nodiscard]] std::vector<std::byte>
decodeHex(std::string_view hex);
99[[nodiscard]] std::string
encodeHex(std::span<const std::byte> hex);