|
constexpr | basic_string_view (const Char *s, size_t count) FMT_NOEXCEPT |
| Constructs a string reference object from a C string and a size. More...
|
|
FMT_CONSTEXPR_CHAR_TRAITS FMT_INLINE | basic_string_view (const Char *s) |
| Constructs a string reference object from a C string computing the size with std::char_traits<Char>::length . More...
|
|
template<typename Traits , typename Alloc > |
FMT_CONSTEXPR | basic_string_view (const std::basic_string< Char, Traits, Alloc > &s) FMT_NOEXCEPT |
| Constructs a string reference from a std::basic_string object. More...
|
|
template<typename S , FMT_ENABLE_IF(std::is_same< S, detail::std_string_view< Char >>::value) > |
FMT_CONSTEXPR | basic_string_view (S s) FMT_NOEXCEPT |
|
constexpr auto | data () const FMT_NOEXCEPT -> const Char * |
| Returns a pointer to the string data. More...
|
|
constexpr auto | size () const FMT_NOEXCEPT -> size_t |
| Returns the string size. More...
|
|
constexpr auto | begin () const FMT_NOEXCEPT -> iterator |
|
constexpr auto | end () const FMT_NOEXCEPT -> iterator |
|
constexpr auto | operator[] (size_t pos) const FMT_NOEXCEPT -> const Char & |
|
FMT_CONSTEXPR void | remove_prefix (size_t n) FMT_NOEXCEPT |
|
FMT_CONSTEXPR_CHAR_TRAITS auto | compare (basic_string_view other) const -> int |
|
template<typename Char>
class basic_string_view< Char >
An implementation of std::basic_string_view
for pre-C++17.
It provides a subset of the API. fmt::basic_string_view
is used for format strings even if std::string_view
is available to prevent issues when a library is compiled with a different -std
option than the client code (which is not recommended).