Playfair cipher: Difference between revisions

Updated D entry
(Updated D entry)
(Updated D entry)
Line 144:
std.conv, std.string, std.regex;
 
string unique(in string s) pure /*nothrow*/ {
string result;
foreach (immutable char c; s)
if (!result.representation.canFind(c)) // Assumes ASCII string.
result ~= c;
return result;