Base64 encode a String:

    "hello\0world".base64_encode
    # => "aGVsbG8Ad29ybGQ=\n"

