MOS Source Code
Loading...
Searching...
No Matches
basic_string_view< CharT > Class Template Reference

#include <string_view.hpp>

Public Member Functions

 basic_string_view (std::nullptr_t)=delete
 
constexpr basic_string_view ()
 
constexpr basic_string_view (const CharT *cs)
 
constexpr basic_string_view (const CharT *s, size_t length)
 
const CharT * data () const
 
const CharT & operator[] (size_t index) const
 
size_t size () const
 
constexpr bool empty () const
 
bool operator== (basic_string_view other) const
 
constexpr basic_string_view substring (size_t start, size_t end=-1) const
 
constexpr size_t find (CharT c) const
 
constexpr size_t find (basic_string_view str) const
 

Private Attributes

const CharT * _pointer
 
size_t _length
 

Detailed Description

template<typename CharT>
class mos::basic_string_view< CharT >

Definition at line 46 of file string_view.hpp.

Constructor & Destructor Documentation

◆ basic_string_view() [1/4]

template<typename CharT>
basic_string_view ( std::nullptr_t )
delete

◆ basic_string_view() [2/4]

template<typename CharT>
basic_string_view ( )
inlineconstexpr

Definition at line 50 of file string_view.hpp.

Referenced by basic_string_view< char >::substring().

◆ basic_string_view() [3/4]

template<typename CharT>
basic_string_view ( const CharT * cs)
inlineconstexpr

Definition at line 51 of file string_view.hpp.

◆ basic_string_view() [4/4]

template<typename CharT>
basic_string_view ( const CharT * s,
size_t length )
inlineconstexpr

Definition at line 52 of file string_view.hpp.

Member Function Documentation

◆ data()

◆ operator[]()

template<typename CharT>
const CharT & operator[] ( size_t index) const
inline

Definition at line 59 of file string_view.hpp.

◆ size()

◆ empty()

template<typename CharT>
bool empty ( ) const
inlineconstexpr

Definition at line 69 of file string_view.hpp.

Referenced by Process::Process().

◆ operator==()

template<typename CharT>
bool operator== ( basic_string_view< CharT > other) const
inline

Definition at line 74 of file string_view.hpp.

◆ substring()

template<typename CharT>
basic_string_view substring ( size_t start,
size_t end = -1 ) const
inlineconstexpr

Definition at line 82 of file string_view.hpp.

Referenced by mos::getTypeName().

◆ find() [1/2]

template<typename CharT>
size_t find ( CharT c) const
inlineconstexpr

Definition at line 88 of file string_view.hpp.

Referenced by mos::getTypeName().

◆ find() [2/2]

template<typename CharT>
size_t find ( basic_string_view< CharT > str) const
inlineconstexpr

Definition at line 98 of file string_view.hpp.

Member Data Documentation

◆ _pointer

template<typename CharT>
const CharT* _pointer
private

◆ _length

template<typename CharT>
size_t _length
private

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