folly::backslashify

backslashify overloads

Synopses

Declared in <folly/String.h>

Backslashify a string, returning the result.

template<class OutputString = std::string>
OutputString
backslashify(
    StringPiece input,
    bool hex_style = false);
» more...

Backslashify a string.

template<class OutputString>
void
backslashify(
    folly::StringPiece input,
    OutputString& output,
    bool hex_style = false);
» more...

Return Value

The backslashified string.

Parameters

NameDescription
inputThe input string to backslashify.
hex_styleWhether to always use "xHH" instead of shorthand escapes.
outputThe output string that the result is written to.