Rosetta
|
#include <core.h>
Public Types | |
using | value_type = Char |
using | iterator = const Char * |
Public Member Functions | |
constexpr | basic_string_view () FMT_NOEXCEPT |
constexpr | basic_string_view (const Char *s, size_t count) FMT_NOEXCEPT |
basic_string_view (const Char *s) | |
template<typename Traits , typename Alloc > | |
FMT_CONSTEXPR | basic_string_view (const std::basic_string< Char, Traits, Alloc > &s) FMT_NOEXCEPT |
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 const Char * | data () const |
constexpr size_t | size () const |
constexpr iterator | begin () const |
constexpr iterator | end () const |
constexpr const Char & | operator[] (size_t pos) const |
FMT_CONSTEXPR void | remove_prefix (size_t n) |
int | compare (basic_string_view other) const |
Private Attributes | |
const Char * | data_ |
size_t | size_ |
Friends | |
bool | operator== (basic_string_view lhs, basic_string_view rhs) |
bool | operator!= (basic_string_view lhs, basic_string_view rhs) |
bool | operator< (basic_string_view lhs, basic_string_view rhs) |
bool | operator<= (basic_string_view lhs, basic_string_view rhs) |
bool | operator> (basic_string_view lhs, basic_string_view rhs) |
bool | operator>= (basic_string_view lhs, basic_string_view rhs) |
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 |
|
inlineconstexpr |
|
inlineconstexpr |
Constructs a string reference object from a C string and a size.
|
inline |
\rst Constructs a string reference object from a C string computing the size with std::char_traits<Char>::length
. \endrst
|
inline |
Constructs a string reference from a std::basic_string
object.
|
inline |
|
inlineconstexpr |
References basic_string_view< Char >::data_.
Referenced by detail::copy_unit(), and formatter< std::chrono::duration< Rep, Period >, Char >::format().
|
inline |
References compare(), basic_string_view< Char >::data_, and basic_string_view< Char >::size_.
|
inlineconstexpr |
Returns a pointer to the string data.
References basic_string_view< Char >::data_.
Referenced by detail::parse_format_string(), detail::value< Context >::value(), and detail::vformat().
|
inlineconstexpr |
References basic_string_view< Char >::data_, and basic_string_view< Char >::size_.
Referenced by detail::copy_unit(), and formatter< std::chrono::duration< Rep, Period >, Char >::format().
|
inlineconstexpr |
References basic_string_view< Char >::data_, and make_symmdef_file_denovo::pos.
|
inline |
|
inlineconstexpr |
Returns the string size.
References basic_string_view< Char >::size_.
Referenced by detail::parse_format_string(), detail::value< Context >::value(), and detail::vformat().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |