On Wednesday, 13 March 2013 at 21:59:54 UTC, Stephen Jones wrote:
Html has &#xxx to access fonts at xxx, does D have something similar?

writeln("a");

to

writeln(&#097);

Thanks.

No but you can easily create this on your own:

import std.string;
import std.stdio;

string[dchar] transTable;
shared static this()
{
    transTable = ['a' : "&#097", 'b' : "&#098"];
}

void main()
{
    string input = "afoo bfoo";
    writeln(input.translate(transTable));
}

Reply via email to