u5e
UnicodeTextC++Library
|
Check and enforce bounds of utf8 text. More...
#include <u5e/utf8_bounds.hpp>
Static Public Member Functions | |
static bool | check (NativeIterator begin, NativeIterator end) |
static bool | enforce (NativeIterator begin, NativeIterator end) |
Public Attributes | |
iterator_assertion< NativeIterator, char > | _assertions |
Check and enforce bounds of utf8 text.
This will only look at the last 6 octets of the text and will only look at the first octet. It will not guarantee that the entire text is valid. The intent of this class is to provide a cheap safety check to make sure you will not have any under or overflow when processing this text.
NativeIterator | The native type to be iterated over. |
Definition at line 21 of file utf8_bounds.hpp.
|
inlinestatic |
Check the bounds of the utf8 text, returns true if the text has correct bounds.
Definition at line 32 of file utf8_bounds.hpp.
|
inlinestatic |
Enforce the bounds of the utf8 text, replace any bad character in the bounds by '?. Returns false if any substitution was made.
Definition at line 57 of file utf8_bounds.hpp.
iterator_assertion<NativeIterator, char> u5e::utf8_bounds< NativeIterator >::_assertions |
The NativeIterator must match the attributes of char
Definition at line 26 of file utf8_bounds.hpp.