Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends | List of all members
lexy::_detail::basic_string_view< CharT > Class Template Reference

#include <string_view.hpp>

Public Types

using char_type = CharT
 
using iterator = const char_type *
 

Public Member Functions

constexpr char_type back () const noexcept
 
constexpr basic_string_view () noexcept
 
constexpr basic_string_view (const char_type *begin, const char_type *end) noexcept
 
constexpr basic_string_view (const char_type *ptr, std::size_t size) noexcept
 
constexpr basic_string_view (const char_type *str) noexcept
 
constexpr basic_string_view (null_terminated, const char_type *ptr, std::size_t size) noexcept
 
constexpr iterator begin () const noexcept
 
constexpr const char_typec_str () const noexcept
 
constexpr const char_typedata () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr std::size_t find (basic_string_view str, std::size_t pos=0) const noexcept
 
constexpr std::size_t find (CharT c, std::size_t pos=0) const noexcept
 
constexpr char_type front () const noexcept
 
constexpr bool is_null_terminated () const noexcept
 
constexpr std::size_t length () const noexcept
 
constexpr char_type operator[] (std::size_t i) const noexcept
 
constexpr void remove_prefix (std::size_t n) noexcept
 
constexpr void remove_suffix (std::size_t n) noexcept
 
constexpr std::size_t size () const noexcept
 
constexpr bool starts_with (basic_string_view prefix) const
 
constexpr basic_string_view substr (std::size_t pos, std::size_t length=npos) const noexcept
 

Static Public Attributes

static constexpr std::size_t npos = std::size_t(-1)
 

Private Attributes

bool _null_terminated
 
const CharT * _ptr
 
std::size_t _size
 

Static Private Attributes

static constexpr CharT empty_string [] = {CharT()}
 

Friends

constexpr friend bool operator!= (basic_string_view< CharT > lhs, basic_string_view< CharT > rhs) noexcept
 
constexpr friend bool operator== (basic_string_view< CharT > lhs, basic_string_view< CharT > rhs) noexcept
 

Detailed Description

template<typename CharT>
class lexy::_detail::basic_string_view< CharT >

Definition at line 17 of file string_view.hpp.

Member Typedef Documentation

◆ char_type

template<typename CharT >
using lexy::_detail::basic_string_view< CharT >::char_type = CharT

Definition at line 22 of file string_view.hpp.

◆ iterator

template<typename CharT >
using lexy::_detail::basic_string_view< CharT >::iterator = const char_type*

Definition at line 51 of file string_view.hpp.

Constructor & Destructor Documentation

◆ basic_string_view() [1/5]

template<typename CharT >
constexpr lexy::_detail::basic_string_view< CharT >::basic_string_view ( )
inlineconstexprnoexcept

Definition at line 25 of file string_view.hpp.

◆ basic_string_view() [2/5]

template<typename CharT >
constexpr lexy::_detail::basic_string_view< CharT >::basic_string_view ( const char_type str)
inlineconstexprnoexcept

Definition at line 28 of file string_view.hpp.

◆ basic_string_view() [3/5]

template<typename CharT >
constexpr lexy::_detail::basic_string_view< CharT >::basic_string_view ( const char_type ptr,
std::size_t  size 
)
inlineconstexprnoexcept

Definition at line 35 of file string_view.hpp.

◆ basic_string_view() [4/5]

template<typename CharT >
constexpr lexy::_detail::basic_string_view< CharT >::basic_string_view ( null_terminated  ,
const char_type ptr,
std::size_t  size 
)
inlineconstexprnoexcept

Definition at line 38 of file string_view.hpp.

◆ basic_string_view() [5/5]

template<typename CharT >
constexpr lexy::_detail::basic_string_view< CharT >::basic_string_view ( const char_type begin,
const char_type end 
)
inlineconstexprnoexcept

Definition at line 44 of file string_view.hpp.

Member Function Documentation

◆ back()

template<typename CharT >
constexpr char_type lexy::_detail::basic_string_view< CharT >::back ( ) const
inlineconstexprnoexcept

Definition at line 85 of file string_view.hpp.

◆ begin()

template<typename CharT >
constexpr iterator lexy::_detail::basic_string_view< CharT >::begin ( ) const
inlineconstexprnoexcept

Definition at line 53 of file string_view.hpp.

◆ c_str()

template<typename CharT >
constexpr const char_type* lexy::_detail::basic_string_view< CharT >::c_str ( ) const
inlineconstexprnoexcept

Definition at line 101 of file string_view.hpp.

◆ data()

template<typename CharT >
constexpr const char_type* lexy::_detail::basic_string_view< CharT >::data ( ) const
inlineconstexprnoexcept

Definition at line 91 of file string_view.hpp.

◆ empty()

template<typename CharT >
constexpr bool lexy::_detail::basic_string_view< CharT >::empty ( ) const
inlineconstexprnoexcept

Definition at line 62 of file string_view.hpp.

◆ end()

template<typename CharT >
constexpr iterator lexy::_detail::basic_string_view< CharT >::end ( ) const
inlineconstexprnoexcept

Definition at line 57 of file string_view.hpp.

◆ find() [1/2]

template<typename CharT >
constexpr std::size_t lexy::_detail::basic_string_view< CharT >::find ( basic_string_view< CharT >  str,
std::size_t  pos = 0 
) const
inlineconstexprnoexcept

Definition at line 144 of file string_view.hpp.

◆ find() [2/2]

template<typename CharT >
constexpr std::size_t lexy::_detail::basic_string_view< CharT >::find ( CharT  c,
std::size_t  pos = 0 
) const
inlineconstexprnoexcept

Definition at line 154 of file string_view.hpp.

◆ front()

template<typename CharT >
constexpr char_type lexy::_detail::basic_string_view< CharT >::front ( ) const
inlineconstexprnoexcept

Definition at line 80 of file string_view.hpp.

◆ is_null_terminated()

template<typename CharT >
constexpr bool lexy::_detail::basic_string_view< CharT >::is_null_terminated ( ) const
inlineconstexprnoexcept

Definition at line 96 of file string_view.hpp.

◆ length()

template<typename CharT >
constexpr std::size_t lexy::_detail::basic_string_view< CharT >::length ( ) const
inlineconstexprnoexcept

Definition at line 70 of file string_view.hpp.

◆ operator[]()

template<typename CharT >
constexpr char_type lexy::_detail::basic_string_view< CharT >::operator[] ( std::size_t  i) const
inlineconstexprnoexcept

Definition at line 75 of file string_view.hpp.

◆ remove_prefix()

template<typename CharT >
constexpr void lexy::_detail::basic_string_view< CharT >::remove_prefix ( std::size_t  n)
inlineconstexprnoexcept

Definition at line 110 of file string_view.hpp.

◆ remove_suffix()

template<typename CharT >
constexpr void lexy::_detail::basic_string_view< CharT >::remove_suffix ( std::size_t  n)
inlineconstexprnoexcept

Definition at line 116 of file string_view.hpp.

◆ size()

template<typename CharT >
constexpr std::size_t lexy::_detail::basic_string_view< CharT >::size ( ) const
inlineconstexprnoexcept

Definition at line 66 of file string_view.hpp.

◆ starts_with()

template<typename CharT >
constexpr bool lexy::_detail::basic_string_view< CharT >::starts_with ( basic_string_view< CharT >  prefix) const
inlineconstexpr

Definition at line 139 of file string_view.hpp.

◆ substr()

template<typename CharT >
constexpr basic_string_view lexy::_detail::basic_string_view< CharT >::substr ( std::size_t  pos,
std::size_t  length = npos 
) const
inlineconstexprnoexcept

Definition at line 123 of file string_view.hpp.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 173 of file string_view.hpp.

◆ operator==

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

Definition at line 160 of file string_view.hpp.

Member Data Documentation

◆ _null_terminated

template<typename CharT >
bool lexy::_detail::basic_string_view< CharT >::_null_terminated
private

Definition at line 182 of file string_view.hpp.

◆ _ptr

template<typename CharT >
const CharT* lexy::_detail::basic_string_view< CharT >::_ptr
private

Definition at line 180 of file string_view.hpp.

◆ _size

template<typename CharT >
std::size_t lexy::_detail::basic_string_view< CharT >::_size
private

Definition at line 181 of file string_view.hpp.

◆ empty_string

template<typename CharT >
constexpr CharT lexy::_detail::basic_string_view< CharT >::empty_string[] = {CharT()}
staticconstexprprivate

Definition at line 19 of file string_view.hpp.

◆ npos

template<typename CharT >
constexpr std::size_t lexy::_detail::basic_string_view< CharT >::npos = std::size_t(-1)
staticconstexpr

Definition at line 108 of file string_view.hpp.


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


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Jun 28 2024 02:20:09