decodeEscapes

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

decodeEscapes
(
Source
)
(
Source s
)
if (
isSourceOfSomeChar!Source
)

Return Value

Type: auto

InputRange of dchar TODO Add to Phobos

Examples

import std.algorithm : 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