# Add \`process.EnvMap\`, a platform-independent environment variable map · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/15d5988e692c182892a118115fd7025048e06c29)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 15d5988e692c182892a118115fd7025048e06c29

Requested commit: 15d5988e692c182892a118115fd7025048e06c29

Commit: 15d5988e692c182892a118115fd7025048e06c29

Tree: 8181463a2a8983373a0b8b53f82caae785f0b5ee

Author: Ryan Liptak

Committer: Jonathan Marler

## Message

```
Add `process.EnvMap`, a platform-independent environment variable map

EnvMap provides the same API as the previously used BufMap (besides `putMove` and `getPtr`), so usage sites of `getEnvMap` can usually remain unchanged.

For non-Windows, EnvMap is a wrapper around BufMap. On Windows, it uses a new EnvMapWindows to handle some Windows-specific behavior:

- Lookups use Unicode-aware case insensitivity (but `get` cannot return an error because EnvMapWindows has an internal buffer to use for lookup conversions)
- Canonical names are returned when iterating the EnvMap

Fixes #10561, closes #4603

```

## Parents

- [d383b940c2e9c9d0f2e8ef7607b38b7a74021b47](https://git.cafe/gitcafe/zig/commit/d383b940c2e9c9d0f2e8ef7607b38b7a74021b47?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/15d5988e692c182892a118115fd7025048e06c29?format=markdown)
