STIR  6.3.0
Public Types | Public Member Functions | Friends | List of all members
basic_string_view< Char > Class Template Reference

An implementation of std::basic_string_view for pre-C++17. More...

#include "/home/sirfuser/devel/STIRdistrib/STIR/external_helpers/fmt/include/fmt/base.h"

Inheritance diagram for basic_string_view< Char >:
Inheritance graph
[legend]

Public Types

using value_type = Char
 
using iterator = const Char *
 

Public Member Functions

constexpr basic_string_view (const Char *s, size_t count) noexcept
 Constructs a string view object from a C string and a size.
 
constexpr basic_string_view (nullptr_t)=delete
 
FMT_ALWAYS_INLINE FMT_CONSTEXPR20 basic_string_view (const Char *s)
 Constructs a string view 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 view 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
 

Detailed Description

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).


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