11#include <boost/multiprecision/cpp_dec_float.hpp>
13USERVER_NAMESPACE_BEGIN
18inline const std::string kEnLocale{
"en_US.UTF-8"};
21std::string
Trim(
const std::string& str);
24std::string
Trim(std::string&& str);
41std::string
Join(
const std::vector<std::string>& strs, std::string_view sep);
44std::string
Format(
double value,
const std::string& locale,
int ndigits = 0,
45 bool is_fixed =
true);
48std::string
Format(
double value,
int ndigits);
51std::string
Format(boost::multiprecision::cpp_dec_float_50 value,
int ndigits);
54bool StartsWith(std::string_view hay, std::string_view needle)
noexcept;
57bool EndsWith(std::string_view hay, std::string_view needle)
noexcept;
61 const std::string& locale = kEnLocale);
64std::string
Capitalize(std::string_view str,
const std::string& locale);
87const std::locale&
GetLocale(
const std::string& name);
97 std::size_t length)
noexcept;
100bool IsValid(
const unsigned char* bytes, std::size_t length)
noexcept;
131void TakePrefix(std::string& text, std::size_t count)
noexcept;