ruma_common::http_headers

Function is_ascii_string_quotable

Source
pub const fn is_ascii_string_quotable(c: char) -> bool
Expand description

Whether the given char is in the US-ASCII character set and allowed inside a quoted string.

Contrary to the definition of quoted strings, this doesn’t allow obs-text characters, i.e. non-US-ASCII characters, as we usually deal with UTF-8 strings rather than ISO-8859-1 strings.