Livox SDK API  V2.2.0
fmt::v5::basic_string_view< Char > Class Template Reference

#include <core.h>

Public Types

typedef Char char_type
 
typedef const Char * iterator
 

Public Member Functions

 basic_string_view () throw ()
 
 basic_string_view (const Char *s, size_t count) throw ()
 
 basic_string_view (const Char *s)
 
template<typename Alloc >
 basic_string_view (const std::basic_string< Char, Alloc > &s) throw ()
 
const Char * data () const
 
size_t size () const
 
iterator begin () const
 
iterator end () const
 
void remove_prefix (size_t n)
 
int compare (basic_string_view other) const
 

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)
 

Detailed Description

template<typename Char>
class fmt::v5::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).

Definition at line 350 of file core.h.

Member Typedef Documentation

template<typename Char>
typedef Char fmt::v5::basic_string_view< Char >::char_type

Definition at line 356 of file core.h.

template<typename Char>
typedef const Char* fmt::v5::basic_string_view< Char >::iterator

Definition at line 357 of file core.h.

Constructor & Destructor Documentation

template<typename Char>
fmt::v5::basic_string_view< Char >::basic_string_view ( )
throw (
)
inline

Definition at line 359 of file core.h.

template<typename Char>
fmt::v5::basic_string_view< Char >::basic_string_view ( const Char *  s,
size_t  count 
)
throw (
)
inline

Constructs a string reference object from a C string and a size.

Definition at line 362 of file core.h.

template<typename Char>
fmt::v5::basic_string_view< Char >::basic_string_view ( const Char *  s)
inline

Constructs a string reference object from a C string computing the size with std::char_traits<Char>::length.

Definition at line 371 of file core.h.

template<typename Char>
template<typename Alloc >
fmt::v5::basic_string_view< Char >::basic_string_view ( const std::basic_string< Char, Alloc > &  s)
throw (
)
inline

Constructs a string reference from a std::basic_string object.

Definition at line 376 of file core.h.

Member Function Documentation

template<typename Char>
iterator fmt::v5::basic_string_view< Char >::begin ( ) const
inline

Definition at line 391 of file core.h.

template<typename Char>
int fmt::v5::basic_string_view< Char >::compare ( basic_string_view< Char >  other) const
inline

Definition at line 400 of file core.h.

template<typename Char>
const Char* fmt::v5::basic_string_view< Char >::data ( ) const
inline

Returns a pointer to the string data.

Definition at line 386 of file core.h.

template<typename Char>
iterator fmt::v5::basic_string_view< Char >::end ( ) const
inline

Definition at line 392 of file core.h.

template<typename Char>
void fmt::v5::basic_string_view< Char >::remove_prefix ( size_t  n)
inline

Definition at line 394 of file core.h.

template<typename Char>
size_t fmt::v5::basic_string_view< Char >::size ( ) const
inline

Returns the string size.

Definition at line 389 of file core.h.

Friends And Related Function Documentation

template<typename Char>
bool operator!= ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
)
friend

Definition at line 411 of file core.h.

template<typename Char>
bool operator< ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
)
friend

Definition at line 414 of file core.h.

template<typename Char>
bool operator<= ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
)
friend

Definition at line 417 of file core.h.

template<typename Char>
bool operator== ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
)
friend

Definition at line 408 of file core.h.

template<typename Char>
bool operator> ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
)
friend

Definition at line 420 of file core.h.

template<typename Char>
bool operator>= ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
)
friend

Definition at line 423 of file core.h.


The documentation for this class was generated from the following file: