BASE64ENCODE$: Difference between revisions
Jump to navigation
Jump to search
Initial version |
No edit summary Tag: Manual revert |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
{{PageSyntax}} | {{PageSyntax}} | ||
: {{Parameter|encodedString$}} = | : {{Parameter|encodedString$}} = [[_BASE64ENCODE$]]({{Parameter|stringToEncode$}}) | ||
Line 19: | Line 19: | ||
{{PageAvailability}} | {{PageAvailability}} | ||
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no --> | |||
<gallery widths="48px" heights="48px" mode="nolines"> | <gallery widths="48px" heights="48px" mode="nolines"> | ||
File:Qb64.png|'''none''' | File:Qb64.png|'''none''' | ||
Line 27: | Line 28: | ||
File:Osx.png|'''yes''' | File:Osx.png|'''yes''' | ||
</gallery> | </gallery> | ||
<!-- additional availability notes go below here --> | |||
Line 44: | Line 46: | ||
* [[_BASE64DECODE$]] | * [[_BASE64DECODE$]] | ||
* [[_INFLATE$]], [[_DEFLATE$]] | * [[_INFLATE$]], [[_DEFLATE$]] | ||
{{PageNavigation}} | {{PageNavigation}} |
Latest revision as of 18:46, 30 January 2025
The _BASE64ENCODE$ function encodes a string containing binary or textual data into Base64 format.
Syntax
- encodedString$ = _BASE64ENCODE$(stringToEncode$)
Parameters
- stringToEncode$ is the string to encode in Base64 format. It can include binary or textual data.
Description
- Base64 encoding is useful for transmitting binary data in text-based systems such as email or HTTP.
- It is also helpful for sharing binary content embedded in source files on message boards and forums.
- Encoded data will only contain characters from the Base64 character set (A-Z, a-z, 0-9, +, /) with optional padding "=".
- Use _BASE64DECODE$ to reverse the operation and retrieve the original data.
Availability
-
none
-
v4.1.0
-
yes
-
yes
-
yes
Examples
- Example 1
- Encoding a string in Base64.
CONST inputString$ = "The quick brown fox jumps over the lazy dog." PRINT "Encoded string: "; _BASE64ENCODE$(inputString$) |
Encoded string: VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4= |
See also