EHS Embedded HTTP Server  1.5.1.0
validator Class Reference

A validator for UTF-8 strings. More...

#include <wsutf8.h>

Public Member Functions

 validator ()
 Constuctor.
 
bool consume (uint32_t byte)
 Validate a single UTF-8 character. More...
 
template<typename iterator_type >
bool decode (iterator_type b, iterator_type e)
 Validate a range of UTF-8 characters. More...
 
bool complete ()
 Retrieve validator state. More...
 
void reset ()
 Reset the validator state.
 

Detailed Description

A validator for UTF-8 strings.

Definition at line 51 of file wsutf8.h.

Member Function Documentation

◆ complete()

bool complete ( )
inline

Retrieve validator state.

Returns
true, if the current state is valid.

Definition at line 88 of file wsutf8.h.

Referenced by validator::reset().

+ Here is the caller graph for this function:

◆ consume()

bool consume ( uint32_t  byte)
inline

Validate a single UTF-8 character.

Parameters
byteThe UTF-8 character to validate
Returns
true, if the character is valid.

Definition at line 61 of file wsutf8.h.

◆ decode()

bool decode ( iterator_type  b,
iterator_type  e 
)
inline

Validate a range of UTF-8 characters.

Parameters
bIterator, pointing to the start of the sequence,
eIterator, pointing to the end of the sequence.
Returns
true, if the supplied sequence is valid.

Definition at line 75 of file wsutf8.h.

Referenced by validator::reset().

+ Here is the caller graph for this function:

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