Melang

Logo

A script language of time-sharing scheduling coroutine in single thread

View the Project on GitHub Water-Melon/Melang

Base64

Import

b = Import('base64');
base64
b.base64(data, op);

Input:

Return value:

Error:

Example:

b = Import('base64');
sys = Import('sys');

text = 'base64 test';
encoded = b.base64(text, 'encode');
sys.print(encoded);
sys.print(b.base64(encoded, 'decode'));

The output is:

YmFzZTY0IHRlc3Q=
base64 test