Function cuicui_chirp::parse_dsl::escape_literal
source · pub fn escape_literal(to_escape: &[u8]) -> Cow<'_, [u8]>
Expand description
Escape backslashes in to_escape
, returning the escaped string.
If to_escape
doesn’t contain any backslash, this returns to_escape
as-is as a Cow::Borrowed
.