OnixS C++ HKEX OMD-C Handler 1.0.0
API documentation
Loading...
Searching...
No Matches
StrRef Class Reference

Public Types

typedef const CharIterator

Public Member Functions

 StrRef () noexcept
 StrRef (const Char *chars, size_t size) noexcept
template<size_t Size>
constexpr StrRef (const char(&value)[Size]) noexcept
 StrRef (const StrRef &other) noexcept
bool empty () const noexcept
const Charitems () const noexcept
size_t size () const noexcept
Iterator begin () const noexcept
Iterator end () const noexcept
void reset () noexcept
void reset (const Char *chars, size_t size) noexcept
const Charoperator[] (size_t index) const
const Charat (size_t index) const
StrRefoperator= (const StrRef &other) noexcept
void swap (StrRef &other) noexcept
StrRef trim () const noexcept

Detailed Description

Definition at line 45 of file String.h.

Member Typedef Documentation

◆ Iterator

typedef const Char* Iterator

STL-like iterator.

Definition at line 49 of file String.h.

Constructor & Destructor Documentation

◆ StrRef() [1/4]

StrRef ( )
inlinenoexcept

Initializes blank instance.

Definition at line 52 of file String.h.

◆ StrRef() [2/4]

StrRef ( const Char * chars,
size_t size )
inlinenoexcept

Full initialization.

Definition at line 60 of file String.h.

◆ StrRef() [3/4]

template<size_t Size>
StrRef ( const char(&) value[Size])
inlineexplicitconstexprnoexcept

Definition at line 72 of file String.h.

◆ StrRef() [4/4]

StrRef ( const StrRef & other)
inlinenoexcept

Initializes as clone of other instance.

Data referenced by clone is not copied. Instead both instances will refer to same text segment.

Definition at line 83 of file String.h.

Member Function Documentation

◆ at()

const Char & at ( size_t index) const
inline

Definition at line 152 of file String.h.

◆ begin()

Iterator begin ( ) const
inlinenoexcept

STL-like begin().

Definition at line 113 of file String.h.

◆ empty()

bool empty ( ) const
inlinenoexcept

Indicates whether array of zero length.

Definition at line 92 of file String.h.

◆ end()

Iterator end ( ) const
inlinenoexcept

STL-like end().

Definition at line 120 of file String.h.

◆ items()

const Char * items ( ) const
inlinenoexcept

Read-only content.

Definition at line 99 of file String.h.

◆ operator=()

StrRef & operator= ( const StrRef & other)
inlinenoexcept

Reinitializes from another instance.

Definition at line 163 of file String.h.

◆ operator[]()

const Char & operator[] ( size_t index) const
inline

Definition at line 145 of file String.h.

◆ reset() [1/2]

void reset ( )
inlinenoexcept

Resets reference to nothing.

Definition at line 127 of file String.h.

◆ reset() [2/2]

void reset ( const Char * chars,
size_t size )
inlinenoexcept

Updates data being referenced.

Definition at line 135 of file String.h.

◆ size()

size_t size ( ) const
inlinenoexcept

Number of chars.

Definition at line 106 of file String.h.

◆ swap()

void swap ( StrRef & other)
inlinenoexcept

Swaps content with other instance.

Definition at line 175 of file String.h.

◆ trim()

StrRef trim ( ) const
inlinenoexcept

Definition at line 185 of file String.h.