Run-length encoding: Difference between revisions

Content deleted Content added
m Tweak
Updated second D entry
Line 951: Line 951:


// Similar to the 'look and say' function.
// Similar to the 'look and say' function.
string encode(in string input) pure /*nothrow*/ {
string encode(in string input) pure nothrow @safe {
if (input.empty)
if (input.empty)
return input;
return input;
Line 971: Line 971:
}
}


string decode(in string input) pure {
string decode(in string input) pure /*@safe*/ {
string i, result;
string i, result;