logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Author

       MongoDB, Inc

Description

       Validates  that the content within utf8 is valid UTF-8 (by the RFC 3629 standard). If allow_null is true,
       then embedded NULL bytes are allowed (\0).

Parameters

utf8: A string to verify.

       • utf8_len: The length of utf8 in bytes.

       • allow_null: A bool indicating that embedded \0 bytes are allowed.

Returns

       true if utf8 contains valid UTF-8.

Synopsis

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

See Also