pub fn parse_env(text: &str) -> Vec<ExtractedPair>Expand description
Parse KEY=VALUE lines from an .env file.
Quoting styles recognised:
KEY="value"andKEY='value'(matching ASCII single/double quotes).KEY=`value`backtick-quoted bodies (some shells + dotenv-cli accept these).- Bare
KEY=valuewith no quotes.
Inline comments are stripped on UNQUOTED values only. Sample seen in
.env files: DB_PASS=p4ssw0rd # rotate quarterly -> value = p4ssw0rd.
Quoted values keep # because the user has explicitly opted into the
literal string including the hash.