25#include <fmt/format.h>
34 if (!simdutf::validate_utf8(str_.data(), str_.size())) {
35 throw StatBenchException(
"Invalid UTF-8 string.");
42 return lhs.str() == rhs.str();
50 return lhs.str() < rhs.str();
70auto formatter<stat_bench::util::Utf8String>::format(
72 -> format_context::iterator {
73 return formatter<string_view>::format(val.str(), context);
70auto formatter<stat_bench::util::Utf8String>::format( {
…}
82 return stream << val.str();
Class of UTF-8 encoded string.
auto str() const noexcept -> const std::string &
Get the string.
Utf8String()=default
Constructor. (Empty string.)
Namespace of fmt library.
Namespace of utility functions and classes.
auto operator!=(const Utf8String &lhs, const Utf8String &rhs) noexcept -> bool
Compare two Utf8String objects.
auto operator==(const Utf8String &lhs, const Utf8String &rhs) noexcept -> bool
Compare two Utf8String objects.
auto operator>=(const Utf8String &lhs, const Utf8String &rhs) noexcept -> bool
Compare two Utf8String objects.
auto operator<<(std::ostream &stream, const Utf8String &val) -> std::ostream &
Format to a stream.
auto operator>(const Utf8String &lhs, const Utf8String &rhs) noexcept -> bool
Compare two Utf8String objects.
auto operator<=(const Utf8String &lhs, const Utf8String &rhs) noexcept -> bool
Compare two Utf8String objects.
auto operator<(const Utf8String &lhs, const Utf8String &rhs) noexcept -> bool
Compare two Utf8String objects.
Namespace of stat_bench source codes.
Definition of StatBenchException class.
Definition of Utf8String class.