8#ifndef LIBCBOR_STRINGS_H
9#define LIBCBOR_STRINGS_H
11#include "cbor/cbor_export.h"
#define CBOR_RESTRICT_POINTER
unsigned char * cbor_mutable_data
cbor_item_t * cbor_new_definite_string(void)
Creates a new definite string.
void cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data data, size_t length)
Set the handle to the underlying string.
cbor_item_t * cbor_build_string(const char *val)
Creates a new string and initializes it.
bool cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the string.
cbor_item_t * cbor_new_indefinite_string(void)
Creates a new indefinite string.
size_t cbor_string_codepoint_count(const cbor_item_t *item)
The number of codepoints in this string.
cbor_item_t * cbor_build_stringn(const char *val, size_t length)
Creates a new string and initializes it.
size_t cbor_string_length(const cbor_item_t *item)
Returns the length of the underlying string in bytes.
bool cbor_string_is_indefinite(const cbor_item_t *item)
Is the string indefinite?
bool cbor_string_is_definite(const cbor_item_t *item)
Is the string definite?
cbor_item_t ** cbor_string_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
size_t cbor_string_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
cbor_mutable_data cbor_string_handle(const cbor_item_t *item)
Get the handle to the underlying string.