Base64ToString()
A Base64ToString() function decodes a provided base64 encoded string to its text value. A default encoding is UTF-8, but the function supports also ASCII, Unicode (UTF-16), UTF-32.
Syntax
Base64ToString(base64String); Base64ToString(base64String, encoding);
Function arguments
- base64String – (String) a base64 encoded string to be decoded;
- encoding – (String) [optional] an encoding of the provided string, supported values: UTF-8 (default), ASCII, UTF-16, Unicode, UTF-32.
Return value
This function returns string.
The Base64ToString() function returns the given decoded string as its text value.
Examples
Example 1
A „result” variable will contain a text „Amodit” from the given base64 encoded string with default UTF-8 encoding.
result = Base64ToString("QW1vZGl0");
Example 2
A „result” variable will contain a text „Amodit” from the given base64 encoded string with default UTF-16 (unicode) encoding.
result = Base64ToString("QQBtAG8AZABpAHQA", "UTF-16");
Example 3
A „result” variable will contain a text „Amodit” from the given base64 encoded string with default UTF-32 encoding.
result = Base64ToString("QQAAAG0AAABvAAAAZAAAAGkAAAB0AAAA", "UTF-32");