Skip to main content

extract_string_arg

Function extract_string_arg 

Source
pub fn extract_string_arg<'a>(
    args: &'a [ValueWord],
    index: usize,
    fn_name: &str,
) -> Result<&'a str, String>
Expand description

Extract a string argument at index from args.

Returns the borrowed &str on success, or an error string naming fn_name and the position.