bson_utf8_validate man page

bson_utf8_validate() — Validates that the content within utf8 is valid UTF-8. If allow_null is true, then embedded NULL bytes are allowed ( ).

Synopsis

bool
bson_utf8_validate (const char *utf8,
                    size_t      utf8_len,
                    bool        allow_null);

Parameters

utf8
A string to verify.
utf8_len
The length of utf8 in bytes.
allow_null
A bool indicating that embedded bytes are allowed.

Description

Validates that the content within utf8 is valid UTF‐8. If allow_null is true , then embedded NULL bytes are allowed ( ).

Returns

true if utf8 contains valid UTF‐8.

Colophon

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.

Referenced By

bson_iter_utf8(3), bson_utf8(3).

2016‐10‐28 libbson