|
Scanbot SDK
|
Represents a non-owning view of a UTF-8 encoded string. More...
#include <ScanbotSDKTypes.h>
Public Attributes | |
| const char * | data |
| size_t | size |
Represents a non-owning view of a UTF-8 encoded string.
Represents a view onto a byte sequence; the view does not own the underlying memory. Whether the payload is valid UTF-8, and whether a null terminator exists at data[size], are determined entirely by the origin of the reference. This struct makes no guarantee of either on its own.
Input to SDK APIs: When passed as an argument to a Scanbot SDK API, the payload is required to be valid UTF-8. If validation fails, the API returns an error. No assumption is made about data[size]; a null terminator is neither required nor read.
Output from SDK APIs: References returned by Scanbot SDK APIs provide both guarantees unconditionally. The payload is valid UTF-8. The underlying allocation extends to size + 1 bytes, and data[size] is \0.