Function serde_keyvalue::key_values::any_string
source · fn any_string(s: &str) -> IResult<&str, Cow<'_, str>>
Expand description
Nom parser for valid strings.
A string can be quoted (using single or double quotes) or not. If it is not quoted, the string is assumed to continue until the next ‘,’, ‘[’, or ‘]’ character. If it is escaped, it continues until the next non-escaped quote.
The returned value is a slice into the current input if no characters to unescape were met, or a fully owned string if we had to unescape some characters.