decodeEscapes

Parse/Decode Escape Sequences in $(S s) into Unicode Characters dchar.

decodeEscapes
(
Source
)
(
Source s
)

Return Value

Type: auto

InputRange of dchar TODO: Move to Phobos

Examples

import std.algorithm.comparison : equal;
assert(`\u00F6`.decodeEscapes.equal("ö"));
assert(`s\u00F6der`.decodeEscapes.equal("söder"));
assert(`_\u00F6\u00F6_`.decodeEscapes.equal("_öö_"));
assert(`http://dbpedia.org/resource/Malm\u00F6`.decodeEscapes.equal(`http://dbpedia.org/resource/Malmö`));

Meta