void main() {
import std.stdio;
immutable input =
"Character,Speech\n" ~
"The multitude,The messiah! Show us the messiah!\n" ~
"Brians mother,
| ".write; bool theadDone = false; foreach (immutable c; input) { switch(c) { case '\n': if (theadDone) { " | |
| ".write; } else { " | |
| ".write; theadDone = true; } break; case ',': " | ".write; break; case '<': "<".write; break; case '>': ">".write; break; case '&': "&".write; break; default: c.write; break; } } " |