---
name: "mongoc_server_api_version_from_string"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_server_api_version_from_string"
---

# mongoc\_server\_api\_version\_from\_string(3)

## SYNOPSIS

```
bool
mongoc_server_api_version_from_string (const char *version,
                                       mongoc_server_api_version_t *out);
```

Given a string **version**, populates **out** with the equivalent *mongoc\_server\_api\_version\_t* if **version** represents a valid API version.

## PARAMETERS

- •

  **version**: A string representing the version identifier.

- •

  **out**: A pointer to a *mongoc\_server\_api\_version\_t*.

## RETURNS

True on success, false on failure. On success, **out** is populated with the converted version string. On failure, **out** is not altered.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
