string view.
More...
#include <view.hpp>
◆ ViewPos
◆ StringView() [1/5]
| join::StringView::StringView |
( |
const char * | in, |
|
|
size_t | count ) |
|
inlineconstexpr |
default constructor.
- Parameters
-
| in | input string. |
| count | number of characters. |
◆ StringView() [2/5]
| join::StringView::StringView |
( |
const char * | first, |
|
|
const char * | last ) |
|
inlineconstexpr |
default constructor.
- Parameters
-
| first | pointer to the first character of the string. |
| last | pointer to the last character of the string. |
◆ StringView() [3/5]
| join::StringView::StringView |
( |
const char * | in | ) |
|
|
inline |
default constructor.
- Parameters
-
◆ StringView() [4/5]
| join::StringView::StringView |
( |
const StringView & | other | ) |
|
|
default |
copy constructor.
- Parameters
-
◆ StringView() [5/5]
| join::StringView::StringView |
( |
StringView && | other | ) |
|
|
default |
move constructor.
- Parameters
-
◆ ~StringView()
| join::StringView::~StringView |
( |
| ) |
|
|
default |
◆ get()
| int join::StringView::get |
( |
| ) |
|
|
inlinenoexcept |
extracts character.
- Returns
- extracted character.
◆ getIf()
| bool join::StringView::getIf |
( |
char | expected | ) |
|
|
inlinenoexcept |
extracts expected character.
- Parameters
-
| expected | expected character. |
- Returns
- true if extracted, false otherwise.
◆ getIfNoCase()
| bool join::StringView::getIfNoCase |
( |
char | expected | ) |
|
|
inlinenoexcept |
extracts expected character (case insensitive, ASCII-only).
- Parameters
-
| expected | expected character. |
- Returns
- true if extracted, false otherwise.
◆ operator=() [1/2]
copy assignment.
- Parameters
-
- Returns
- a reference of the current object.
◆ operator=() [2/2]
move assignment.
- Parameters
-
- Returns
- a reference of the current object.
◆ peek()
| int join::StringView::peek |
( |
| ) |
const |
|
inlinenoexcept |
get character without extracting it.
- Returns
- extracted character.
◆ read()
| size_t join::StringView::read |
( |
char * | buf, |
|
|
size_t | count ) |
|
inlinenoexcept |
read characters.
- Parameters
-
| buf | output buffer. |
| count | number of characters to read. |
- Returns
- number of characters read.
◆ readUntilEscaped()
| void join::StringView::readUntilEscaped |
( |
std::string & | out | ) |
|
|
inlinenoexcept |
read characters until escaped.
- Parameters
-
◆ seek()
| void join::StringView::seek |
( |
ViewPos | pos | ) |
|
|
inlinenoexcept |
seek to the specified position.
- Parameters
-
◆ skipWhitespaces()
| int join::StringView::skipWhitespaces |
( |
| ) |
|
|
inlinenoexcept |
skip whitespaces.
- Returns
- 0 on success, -1 otherwise.
◆ skipWhitespacesAndComments()
| int join::StringView::skipWhitespacesAndComments |
( |
| ) |
|
|
inlinenoexcept |
skip whitespaces and comments.
- Returns
- 0 on success, -1 otherwise.
◆ tell()
| ViewPos join::StringView::tell |
( |
| ) |
const |
|
inlinenoexcept |
get input position indicator.
- Returns
- current position.
The documentation for this class was generated from the following file: