ToBase64

Calculates the Base64 representation of a string or binary object. The Base64 format uses printable characters, allowing binary data to be sent in forms and e-mail, and stored in a database or file.

ToBase64( strOrBin [, encoding ] )

Returns: String

Argument Description
strOrBin
any, required

A string, the name of a string, or a binary object.

encoding
string, optional

For a string, defines how characters are represented in a byte array.

Examples

dump(ToBase64("ToBase64")); // VG9CYXNlNjQ=

See also