Skip to main content

as_str

Function as_str 

Source
pub fn as_str(value: &[u8]) -> Result<&str, Utf8Error>
Expand description

Interpret a value as UTF-8.

The parser hands back bytes borrowed from argv; this is the conversion most callers want, and the point at which a non-UTF-8 command line is rejected — but only for the values actually inspected.