bson_unichar_t (3) - Linux Manuals
bson_unichar_t: Unicode Character Abstraction
Command to display bson_unichar_t
manual in Linux: $ man 3 bson_unichar_t
NAME
bson_unichar_t - Unicode Character Abstraction
SYNOPSIS
typedef uint32_t bson_unichar_t;
DESCRIPTION
bson_unichar_t
provides an abstraction on a single unicode character. It is the 32-bit representation of a character. As UTF-8 can contain multi-byte characters, this should be used when iterating through UTF-8 text.
EXAMPLE
static void
print_each_char (const char *str)
{
bson_unichar_t c;
for (; *str; str = bson_utf8_next_char (str)) {
c = bson_utf8_get_char (str);
printf ("The numberic value is %u.\n", (unsigned)c);
}
}
COLOPHON
This page is part of libbson.
Please report any bugs at
https://jira.mongodb.org/browse/CDRIVER.
Pages related to bson_unichar_t
- bson_uint32_to_string (3) - Converts value to a string.
- bson_utf8_escape_for_json (3) - Escapes the string utf8 to be placed inside of a JSON string.
- bson_utf8_from_unichar (3) - Converts a single unicode character to a multi-byte UTF-8 sequence. The result is stored in utf8 and the number of bytes used in len.
- bson_utf8_get_char (3) - Converts the current character in a UTF-8 sequence to a bson_unichar_t, the 32-bit representation of the multi-byte character.
- bson_utf8_next_char (3) - Advances within utf8 to the next UTF-8 character, which may be multiple bytes offset from utf8. A pointer to the next character is returned.
- bson_utf8_validate (3) - Validates that the content within utf8 is valid UTF-8. If allow_null is true, then embedded NULL bytes are allowed ( ).
- bson_append_array (3) - The bson_append_array() function shall append child to bson using the specified key. The type of the field will be an array, but it is the responsibility of the caller to ensure that the keys of child are properly formatted with string keys such as "0", "1", "2" and so forth.
- bson_append_array_begin (3) - The bson_append_array_begin() function shall begin appending an array field to bson. This allows for incrementally building a sub-array. Doing so will generally yield better performance as you will serialize to a single buffer. When done building the sub-array, the caller MUST call bson_append_array_end().
- bson_append_array_end (3) - The bson_append_array_end() function shall complete the appending of an array field started with bson_append_array_begin(). child is invalid after calling this function.