Load into result a quoted, escaped C/C++ string literal of input.

Synopsis

Declared in <bdlb_literalutil.h>

static
void
createQuotedEscapedCString(
    std::pmr::string* result,
    std::string_view const& input);

Description

Load into the specified result string the " delimited and escaped C/C++ string literal equivalent representing the same value as that of the specified input string. When the C string literal equivalent is translated by a compiler having C‐compatible string literals, it will result in a string identical to the input string. Note that this code uses the (ASCII) '' character, rather than Unicode code points for escapes.

Parameters

Name

Description

result

string to receive the quoted, escaped literal

input

string value to represent as a C/C++ literal

Created with MrDocs