Iterate chars and ANSI SGR in a multi-byte character string.
More...
#include <zypp-tui/utils/text.h>
Iterate chars and ANSI SGR in a multi-byte character string.
The iterator offers (pos, size) of the current wchar
within the original text_r. Also the number of columns the current wchar
occupies on the screen.
- Note
- : The iterator contents fakes all WS to either '
' or ' '.
-
: isCH includes SGR sequences
Definition at line 86 of file text.h.
◆ MbsIterator()
ztui::mbs::MbsIterator::MbsIterator |
( |
boost::string_ref | text_r | ) |
|
|
inline |
◆ operator*() [1/2]
wchar_t & ztui::mbs::MbsIterator::operator* |
( |
| ) |
|
|
inline |
Use with care; all WS are faked to either '
' or ' '.
Definition at line 98 of file text.h.
◆ operator*() [2/2]
const wchar_t & ztui::mbs::MbsIterator::operator* |
( |
| ) |
const |
|
inline |
◆ pos()
const char * ztui::mbs::MbsIterator::pos |
( |
| ) |
const |
|
inline |
◆ size()
size_t ztui::mbs::MbsIterator::size |
( |
| ) |
const |
|
inline |
◆ columns()
size_t ztui::mbs::MbsIterator::columns |
( |
| ) |
const |
|
inline |
◆ ref()
boost::string_ref ztui::mbs::MbsIterator::ref |
( |
| ) |
const |
|
inline |
◆ atEnd()
bool ztui::mbs::MbsIterator::atEnd |
( |
| ) |
const |
|
inline |
◆ isNL()
bool ztui::mbs::MbsIterator::isNL |
( |
| ) |
const |
|
inline |
◆ isWS()
bool ztui::mbs::MbsIterator::isWS |
( |
| ) |
const |
|
inline |
◆ isCH()
bool ztui::mbs::MbsIterator::isCH |
( |
| ) |
const |
|
inline |
◆ isSGR()
bool ztui::mbs::MbsIterator::isSGR |
( |
| ) |
const |
|
inline |
◆ operator++()
◆ ansiSize()
unsigned ztui::mbs::MbsIterator::ansiSize |
( |
const char * | pos_r | ) |
|
|
inlineprivate |
◆ setToEnd()
void ztui::mbs::MbsIterator::setToEnd |
( |
| ) |
|
|
inlineprivate |
◆ _text
boost::string_ref ztui::mbs::MbsIterator::_text |
|
private |
◆ _tpos
const char* ztui::mbs::MbsIterator::_tpos |
|
private |
◆ _trest
size_t ztui::mbs::MbsIterator::_trest |
|
private |
◆ _tread
size_t ztui::mbs::MbsIterator::_tread |
|
private |
◆ _cols
size_t ztui::mbs::MbsIterator::_cols |
|
mutableprivate |
◆ _wc
wchar_t ztui::mbs::MbsIterator::_wc |
|
private |
◆ _mbstate
mbstate_t ztui::mbs::MbsIterator::_mbstate |
|
private |
The documentation for this class was generated from the following file: