![]() |
WPILibC++ 2025.3.2
|
An implementation of std::basic_string_view for pre-C++17.
More...
#include <fmt/base.h>
Public Types | |
| using | value_type = Char |
| using | iterator = const Char* |
Public Member Functions | |
| constexpr | basic_string_view () noexcept |
| 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 (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 |
Constructs a string reference from a std::basic_string or a std::basic_string_view object. | |
| 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 |
Friends | |
| FMT_CONSTEXPR 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 |
| 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::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).
| using basic_string_view< Char >::iterator = const Char* |
| using basic_string_view< Char >::value_type = Char |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Constructs a string reference object from a C string and a size.
|
constexprdelete |
|
inline |
Constructs a string reference object from a C string.
|
inlinenoexcept |
Constructs a string reference from a std::basic_string or a std::basic_string_view object.
|
inlineconstexprnoexcept |
|
inline |
|
inlineconstexprnoexcept |
Returns a pointer to the string data.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Returns the string size.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |