# HG changeset patch # User Trass3r # Date 1284511644 -7200 # Node ID 766e6dc390e1eeb464e26ab873a59e77d6b2bf3c # Parent a79be6756969e7a55dd3e7718a49c1e760178300 + Escape.escapeChar() diff -r a79be6756969 -r 766e6dc390e1 dmd/Escape.d --- a/dmd/Escape.d Tue Sep 14 15:49:40 2010 +0200 +++ b/dmd/Escape.d Wed Sep 15 02:47:24 2010 +0200 @@ -2,10 +2,23 @@ struct Escape { - const(char)* strings[256]; + string[256] strings; - static const(char)* escapeChar(uint c) + /*************************************** + * Find character string to replace c with. + */ + static string escapeChar(char c) { - assert(false); + switch (c) + { + case '<': + return "<"; + case '>': + return ">"; + case '&': + return "&"; + default: + return null; + } } } \ No newline at end of file