# std::text_encoding::environment_is

> C++ Atlas: `cppatlas.com/w/cpp/text/text_encoding/environment_is` | Source: https://en.cppreference.com/w/cpp/text/text_encoding/environment_is | Domain: Text processing | Standards: C++26

Checks whether the environment encoding is equal to the encoding whose MIBenum value is the specified value I. A call to this function is equivalent to return environment() == I;.

## Official Specification Summary (cppreference)

```cpp
template< id I >
static bool environment_is(); // (since C++26)
```

Checks whether the environment encoding is equal to the encoding whose MIBenum value is the specified value `I`. A call to this function is equivalent to `return environment() == I;`.

This function is deleted unless the `CHAR_BIT` is `8`.

### Template parameters

- `I` - a `text_encoding::id` whose value to compare

### Return value

`true` if `environment()` is equal to `I`; `false` otherwise.

### Example

> Note: This section is incomplete Reason: no example

---
Attribution: content from https://en.cppreference.com/w/cpp/text/text_encoding/environment_is (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.