string probe.
More...
#include <probe.hpp>
|
| constexpr | StringProbe (const char *in, size_t count) |
| | default constructor.
|
| |
| constexpr | StringProbe (const char *first, const char *last) |
| | default constructor.
|
| |
| | StringProbe (const char *in) |
| | default constructor.
|
| |
| | StringProbe (const StringProbe &other)=default |
| | copy constructor.
|
| |
| StringProbe & | operator= (const StringProbe &other)=default |
| | copy assignment.
|
| |
| | StringProbe (StringProbe &&other)=default |
| | move constructor.
|
| |
| StringProbe & | operator= (StringProbe &&other)=default |
| | move assignment.
|
| |
| | ~StringProbe ()=default |
| | destroy instance.
|
| |
| int | peek () const noexcept |
| | get character without extracting it.
|
| |
| int | get () noexcept |
| | extracts character.
|
| |
| bool | getIf (char expected) noexcept |
| | extracts expected character.
|
| |
| bool | getIfNoCase (char expected) noexcept |
| | extracts expected character (case insensitive, ASCII-only).
|
| |
| size_t | readDigits (uint64_t &value, size_t max=std::numeric_limits< size_t >::max()) noexcept |
| | read consecutive digits.
|
| |
| size_t | read (char *buf, size_t count) noexcept |
| | read characters.
|
| |
| ProbePos | tell () const noexcept |
| | get input position indicator.
|
| |
| ProbePos | end () const noexcept |
| | get end position indicator.
|
| |
| void | seek (ProbePos pos) noexcept |
| | seek to the specified position.
|
| |
◆ ProbePos
◆ StringProbe() [1/5]
| dconv::StringProbe::StringProbe |
( |
const char * | in, |
|
|
size_t | count ) |
|
inlineconstexpr |
default constructor.
- Parameters
-
| in | input string. |
| count | number of characters. |
◆ StringProbe() [2/5]
| dconv::StringProbe::StringProbe |
( |
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. |
◆ StringProbe() [3/5]
| dconv::StringProbe::StringProbe |
( |
const char * | in | ) |
|
|
inlineexplicit |
default constructor.
- Parameters
-
◆ StringProbe() [4/5]
| dconv::StringProbe::StringProbe |
( |
const StringProbe & | other | ) |
|
|
default |
copy constructor.
- Parameters
-
◆ StringProbe() [5/5]
| dconv::StringProbe::StringProbe |
( |
StringProbe && | other | ) |
|
|
default |
move constructor.
- Parameters
-
◆ ~StringProbe()
| dconv::StringProbe::~StringProbe |
( |
| ) |
|
|
default |
◆ end()
| ProbePos dconv::StringProbe::end |
( |
| ) |
const |
|
inlinenoexcept |
get end position indicator.
- Returns
- end position.
◆ get()
| int dconv::StringProbe::get |
( |
| ) |
|
|
inlinenoexcept |
extracts character.
- Returns
- extracted character.
◆ getIf()
| bool dconv::StringProbe::getIf |
( |
char | expected | ) |
|
|
inlinenoexcept |
extracts expected character.
- Parameters
-
| expected | expected character. |
- Returns
- true if extracted, false otherwise.
◆ getIfNoCase()
| bool dconv::StringProbe::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 dconv::StringProbe::peek |
( |
| ) |
const |
|
inlinenoexcept |
get character without extracting it.
- Returns
- extracted character.
◆ read()
| size_t dconv::StringProbe::read |
( |
char * | buf, |
|
|
size_t | count ) |
|
inlinenoexcept |
read characters.
- Parameters
-
| buf | output buffer. |
| count | number of characters to read. |
- Returns
- number of characters read.
◆ readDigits()
| size_t dconv::StringProbe::readDigits |
( |
uint64_t & | value, |
|
|
size_t | max = std::numeric_limits<size_t>::max () ) |
|
inlinenoexcept |
read consecutive digits.
- Parameters
-
| value | value the digits are appended to. |
| max | maximum number of digits to read. |
- Returns
- number of digits read.
◆ seek()
| void dconv::StringProbe::seek |
( |
ProbePos | pos | ) |
|
|
inlinenoexcept |
seek to the specified position.
- Parameters
-
◆ tell()
| ProbePos dconv::StringProbe::tell |
( |
| ) |
const |
|
inlinenoexcept |
get input position indicator.
- Returns
- current position.
The documentation for this class was generated from the following file: