get_list
Returns key in dotenv content split on separator into a list, or default when it is
absent.
Each item is trimmed of surrounding whitespace; empty items (a leading, trailing or doubled separator) are kept as empty strings rather than dropped, so the item count always matches the number of separators plus one.
Import
Section titled “Import”Cargo feature env (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
content | &str | The dotenv text to read. |
key | &str | The variable name to look up. |
separator | char | The character that separates items, such as ,. |
default | &[&str] | Returned when key is absent. |
Returns
Section titled “Returns”Vec<String> — The items, in order, or default.
