|
constexpr | basic_string_view (const Char *s, size_t count) noexcept |
| Constructs a string reference object from a C string and a size.
|
|
constexpr | basic_string_view (std::nullptr_t)=delete |
|
FMT_CONSTEXPR20 | basic_string_view (const Char *s) |
| Constructs a string reference object from a C string.
|
|
template<typename S, FMT_ENABLE_IF(detail::is_std_string_like< S >::value &&std::is_same< typename S::value_type, Char >::value)> |
FMT_CONSTEXPR | basic_string_view (const S &s) noexcept |
|
constexpr auto | data () const noexcept -> const Char * |
| Returns a pointer to the string data.
|
|
constexpr auto | size () const noexcept -> size_t |
| Returns the string size.
|
|
constexpr auto | begin () const noexcept -> iterator |
|
constexpr auto | end () const noexcept -> iterator |
|
constexpr auto | operator[] (size_t pos) const noexcept -> const Char & |
|
FMT_CONSTEXPR void | remove_prefix (size_t n) noexcept |
|
FMT_CONSTEXPR auto | starts_with (basic_string_view< Char > sv) const noexcept -> bool |
|
FMT_CONSTEXPR auto | starts_with (Char c) const noexcept -> bool |
|
FMT_CONSTEXPR auto | starts_with (const Char *s) const -> bool |
|
FMT_CONSTEXPR 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::basic_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).