#include <core.h>
Public Types | |
using | iterator = const Char * |
using | value_type = Char |
Public Member Functions | |
constexpr | basic_string_view () noexcept |
FMT_CONSTEXPR_CHAR_TRAITS FMT_INLINE | basic_string_view (const Char *s) |
constexpr | basic_string_view (const Char *s, size_t count) noexcept |
template<typename Traits , typename Alloc > | |
FMT_CONSTEXPR | basic_string_view (const std::basic_string< Char, Traits, Alloc > &s) noexcept |
template<typename S , FMT_ENABLE_IF(std::is_same< S, detail::std_string_view< Char >>::value) > | |
FMT_CONSTEXPR | basic_string_view (S s) noexcept |
constexpr auto | begin () const noexcept -> iterator |
FMT_CONSTEXPR_CHAR_TRAITS auto | compare (basic_string_view other) const -> int |
constexpr auto | data () const noexcept -> const Char * |
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 |
constexpr auto | size () const noexcept -> size_t |
FMT_CONSTEXPR_CHAR_TRAITS auto | starts_with (basic_string_view< Char > sv) const noexcept -> bool |
FMT_CONSTEXPR_CHAR_TRAITS auto | starts_with (Char c) const noexcept -> bool |
FMT_CONSTEXPR_CHAR_TRAITS auto | starts_with (const Char *s) const -> bool |
Private Attributes | |
const Char * | data_ |
size_t | size_ |
Friends | |
auto | operator!= (basic_string_view lhs, basic_string_view rhs) -> bool |
auto | operator< (basic_string_view lhs, basic_string_view rhs) -> bool |
auto | operator<= (basic_string_view lhs, basic_string_view rhs) -> bool |
FMT_CONSTEXPR_CHAR_TRAITS friend auto | operator== (basic_string_view lhs, basic_string_view rhs) -> bool |
auto | operator> (basic_string_view lhs, basic_string_view rhs) -> bool |
auto | operator>= (basic_string_view lhs, basic_string_view rhs) -> bool |
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).
using basic_string_view< Char >::iterator = const Char* |
using basic_string_view< Char >::value_type = Char |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |