base64.decode
base64.decode
Function
Decode the Base64 string held in base64(text) to UTF-8 text.
Syntax
base64(text).decode(mode)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| mode | Int | No | 0 | Coding table: 0 BASE64_STANDARD, 1 BASE64_STANDARD_NO_PAD, 2 BASE64_URL_SAFE, 3 BASE64_URL_SAFE_NO_PAD. |
Return value
| Type | Description |
|---|---|
| String | Returns the decoded string. |
Example
result = base64('QlQ=').decode() // Output: BT print result
Notes
- An error will be reported if the decoding result is not a legal UTF-8 string.