util.Strings.base64Decode

Decodes a Base64 encoded string and writes the bytes to a file.

Syntax

util.Strings.base64Decode(
  base64 STRING,
  filename STRING
 )
  1. base64 is the Base64 encoded string.
  2. filename is the name of the file to write to.

Usage

The util.Strings.base64Decode() method converts the Base64 encoded string passed as first parameter, and writes the bytes to file specified as second parameter.

Example

IMPORT util
MAIN
    DEFINE base64 STRING
    LET base64 = util.Strings.base64Encode( "picture1.png" )
    DISPLAY base64
    CALL util.Strings.base64Decode( base64, "picture2.png" )
END MAIN