All pastes #576365 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-19 13:31 UTC
rendered paste body
foo ~ $ ./a.out doskias e peeras
ZG9za2lhcyBlIHBlZXJhcw==
foo ~ $ ./a.out ZG9za2lhcyBlIHBlZXJhcw==
doskias e peeras
foo ~ $ cat base64.d 
import std.stdio;
import std.string;
import std.base64;

int main(char[][] args) {
  if (args[1 .. $].length == 0)
    return 0;

  char[] s = join(args[1 .. $], " ");

  try
    writefln(decode(s));
  catch (Exception e)
    writefln(encode(s));

  return 0;
}