11USERVER_NAMESPACE_BEGIN
17std::string
Trim(
const std::string& str);
20std::string
Trim(std::string&& str);
22enum class SplitFlags {
24 kCompressAdjacentSeparators = 1 << 0,
44std::string
Join(
const std::vector<std::string>& strs, std::string_view sep);
47std::string
Format(
double value,
int ndigits);
50constexpr bool StartsWith(std::string_view hay, std::string_view needle)
noexcept {
51 return hay.substr(0, needle.size()) == needle;
55constexpr bool EndsWith(std::string_view hay, std::string_view needle)
noexcept {
56 return hay.size() >= needle.size() && hay.substr(hay.size() - needle.size()) == needle;
63bool ICaseEndsWith(std::string_view hay, std::string_view needle)
noexcept;
95bool IsValid(
const unsigned char* bytes, std::size_t length)
noexcept;
125void TakePrefix(std::string& text, std::size_t count)
noexcept;