Path: blob/main/contrib/libcbor/src/cbor/internal/unicode.h
39566 views
/*1* Copyright (c) 2014-2020 Pavel Kalvoda <[email protected]>2*3* libcbor is free software; you can redistribute it and/or modify4* it under the terms of the MIT license. See LICENSE for details.5*/67#ifndef LIBCBOR_UNICODE_H8#define LIBCBOR_UNICODE_H910#include "cbor/common.h"1112#ifdef __cplusplus13extern "C" {14#endif1516enum _cbor_unicode_status_error { _CBOR_UNICODE_OK, _CBOR_UNICODE_BADCP };1718/** Signals unicode validation error and possibly its location */19struct _cbor_unicode_status {20enum _cbor_unicode_status_error status;21size_t location;22};2324_CBOR_NODISCARD25size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length,26struct _cbor_unicode_status* status);2728#ifdef __cplusplus29}30#endif3132#endif // LIBCBOR_UNICODE_H333435