[#absl-CHexEscape] = xref:absl.adoc[absl]::CHexEscape :relfileprefix: ../ :mrdocs: Escapes a `src` string using C‐style escape sequences, escaping other non‐printable/non‐whitespace bytes as hexadecimal sequences (e.g. "xFF"). == Synopsis Declared in `<absl/strings/escaping.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::string CHexEscape(std::string_view src); ---- == Description Example: std::string s = "foorbartbaz010011012013014x0dn"; std::string escaped_s = absl::CHexEscape(s); EXPECT_EQ(escaped_s, "foo\rbar\tbaz\x08\t\n\x0b\x0c\r\n"); == Return Value The escaped string. == Parameters [cols="1,4"] |=== | Name| Description | *src* | The string to escape. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#