Crate kasedenv

source ·
Expand description

§Read environment variables by lower, upper case or case-insensitive keys

This crate provides an interface similar to std::env but whose keys are converted to lower or UPPER case, or presented in a way that can be compared regardless of case, either ASCII or Unicode (with feature unicode enabled, using unicase).

Only variants of env::var and env::vars are provided, since OsStrs are not necessarily human-readable character strings.

Structs§

  • Iterator of environment variables whose keys are lowercased.
  • Helper for uncased comparison.
  • Iterator of environment variables whose keys can be compared regardless of case.
  • Iterator of environment variables whose keys are UPPERCASED.

Functions§

  • Get value by a key like env::var, but accept a lowercased key of AsRef<str> rather than AsRef<OsStr>.
  • Get an iterator of environment variables like env::vars, but with lowercased keys.
  • Get value by a key like env::var, but accept a key of any case of AsRef<str> rather than AsRef<OsStr>.
  • Get an UncasedVars whose keys can be compared regardless of case.
  • Get value by a key like env::var, but accept an UPPERCASED key of AsRef<str> rather than AsRef<OsStr>.
  • Get an iterator of environment variables like env::vars, but with uppercased keys.