bson_oid_is_valid() — libbson 1.6.3

- libbson 1.6.3 »
- API Reference »
- bson_oid_t

# bson_oid_is_valid()

## Synopsis

    bool
    bson_oid_is_valid (const char *str, size_t length);

## Parameters

- `str`: A string.
- `length`: The length of `str`.

## Description

Checks if a string containing a hex encoded string is a valid BSON ObjectID.

## Returns

true if `str` could be parsed.

Created using Sphinx 1.5.3, based on Sphinx Readable Theme.