https://issues.dlang.org/show_bug.cgi?id=13018
Issue ID: 13018 Summary: std.string.translate needs mutable translation table Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: jappleg...@gmail.com This code doesn't compile: import std.string; immutable dchar[dchar] tt; shared static this() { tt = ['a': '0', 'b': '1']; } void main() { assert(translate("abc", tt) == "01c"); } http://dpaste.dzfl.pl/1d4a44b51bb3 --