as_raw_string

Function as_raw_string 

Source
pub fn as_raw_string(s: &str) -> Option<String>
Expand description

Returns a raw string representation if the string contains quotes or backslashes. Otherwise returns None (caller should use regular quoting or bare string).

Raw strings avoid escaping by using r#'...'# syntax with enough # characters to ensure the closing delimiter is unambiguous.

Note: Nushell requires at least one # in raw strings (i.e., r#'...'# not r'...').