libzypp  17.35.16
ztui::utf8::string Class Reference

Simple utf8 string. More...

#include <zypp-tui/output/Utf8.h>

Public Types

using size_type = std::string::size_type
 

Public Member Functions

 string ()
 
 string (const char *rhs)
 
 string (std::string rhs)
 
const char * c_str () const
 
const std::string & str () const
 
std::string & str ()
 
size_type size () const
 utf8 size More...
 
size_type length () const
 
string substr (size_type pos_r=0, size_type len_r=npos) const
 utf8 substring More...
 

Static Public Attributes

static const size_type npos = std::string::npos
 

Private Member Functions

bool isContinuationByte (char ch) const
 Test for continuation byte '10xxxxxx'. More...
 
size_type upos (size_type pos_r, size_type start_r=0) const
 Return start of codepoint pos_r starting at position start_r. More...
 

Private Attributes

std::string _str
 

Related Functions

(Note that these are not member functions.)

string operator+ (const string &lhs, const string &rhs)
 
std::ostream & operator<< (std::ostream &str, const string &obj)
 

Detailed Description

Simple utf8 string.

Definition at line 31 of file Utf8.h.

Member Typedef Documentation

◆ size_type

using ztui::utf8::string::size_type = std::string::size_type

Definition at line 34 of file Utf8.h.

Constructor & Destructor Documentation

◆ string() [1/3]

ztui::utf8::string::string ( )
inline

Definition at line 38 of file Utf8.h.

◆ string() [2/3]

ztui::utf8::string::string ( const char *  rhs)
inline

Definition at line 39 of file Utf8.h.

◆ string() [3/3]

ztui::utf8::string::string ( std::string  rhs)
inline

Definition at line 40 of file Utf8.h.

Member Function Documentation

◆ c_str()

const char* ztui::utf8::string::c_str ( ) const
inline

Definition at line 43 of file Utf8.h.

◆ str() [1/2]

const std::string& ztui::utf8::string::str ( ) const
inline

Definition at line 44 of file Utf8.h.

◆ str() [2/2]

std::string& ztui::utf8::string::str ( )
inline

Definition at line 45 of file Utf8.h.

◆ size()

size_type ztui::utf8::string::size ( ) const
inline

utf8 size

Definition at line 49 of file Utf8.h.

◆ length()

size_type ztui::utf8::string::length ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 118 of file Utf8.h.

◆ substr()

string ztui::utf8::string::substr ( size_type  pos_r = 0,
size_type  len_r = npos 
) const
inline

utf8 substring

Definition at line 122 of file Utf8.h.

◆ isContinuationByte()

bool ztui::utf8::string::isContinuationByte ( char  ch) const
inlineprivate

Test for continuation byte '10xxxxxx'.

Definition at line 131 of file Utf8.h.

◆ upos()

size_type ztui::utf8::string::upos ( size_type  pos_r,
size_type  start_r = 0 
) const
inlineprivate

Return start of codepoint pos_r starting at position start_r.

Definition at line 135 of file Utf8.h.

Friends And Related Function Documentation

◆ operator+()

string operator+ ( const string lhs,
const string rhs 
)
related

concatenation

Definition at line 173 of file Utf8.h.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  str,
const string obj 
)
related

Stream output

Definition at line 189 of file Utf8.h.

Member Data Documentation

◆ npos

const size_type ztui::utf8::string::npos = std::string::npos
static

Definition at line 35 of file Utf8.h.

◆ _str

std::string ztui::utf8::string::_str
private

Definition at line 169 of file Utf8.h.


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