ftos.convert.string.toBase64
Converts an ASCII-encoded string to a Base64-encoded string.
Syntax
Copy
ftos.convert.string.toBase64(s: string): string;
| Parameter | Type | Description |
|---|---|---|
s
|
string |
Input string to convert. |
Return Value
Returns a Base64-encoded string generated from the provided ASCII input.
Example
This example:
- Takes the Hello World input string.
- Converts it to Base64 SGVsbG8gV29ybGQ=.
- Stores the result in the baseData variable.
Copy
var baseData = ftos.convert.string.toBase64('Hello World');