BSON_UTF8_VALIDATE(3)

NAME
bson_utf8_validate()

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

PARAMETERS

.B utf8
    A string to verify.

.B utf8_len
    The length of utf8 in bytes.

.B allow_null
    A bool indiciating 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.