Kea 2.7.5
|
A simple representation of a range of a string. More...
#include <master_lexer.h>
Public Attributes | |
const char * | beg |
The start address of the string. | |
size_t | len |
The length of the string in bytes. | |
A simple representation of a range of a string.
This is a straightforward pair of the start pointer of a string and its length. The STRING
and QSTRING
types of tokens will be primarily represented in this form.
Any character can be stored in the valid range of the region. In particular, there can be a nul character (\0) in the middle of the region. So the usual string manipulation API may not work as expected.
The MasterLexer
implementation ensures that there are at least len + 1 bytes of valid memory region starting from beg, and that beg[len] is \0. This means the application can use the bytes as a validly nul-terminated C string if there is no intermediate nul character. Note also that due to this property beg is always non null; for an empty string len will be set to 0 and beg[0] is \0.
Definition at line 96 of file master_lexer.h.
const char* isc::dns::MasterToken::StringRegion::beg |
The start address of the string.
Definition at line 97 of file master_lexer.h.
size_t isc::dns::MasterToken::StringRegion::len |
The length of the string in bytes.
Definition at line 98 of file master_lexer.h.