needEscaping

Check if value needs to be escaped. This function is currently tolerant to single slashes and tabs.

@nogc @safe nothrow pure
bool
needEscaping
(
String
)
(
String value
)
if (
isSomeString!String &&
is(ElementEncodingType!String : char)
)

Return Value

Type: bool

true if value needs to escaped, false otherwise.

Examples

assert("new\nline".needEscaping);
assert(!`i have \ slash`.needEscaping);
assert("i like\rcarriage\rreturns".needEscaping);
assert(!"just a text".needEscaping);

See Also

Meta