Convert to Base64

From Cuis CookBook
Revision as of 20:10, 12 May 2025 by Nmingott (talk | contribs) (syntax hilight)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Problem

Encode a String to Base64.

Solution

Convert to ByteArray and then encode using #base64Encoded:

'Hello World' asByteArray base64Encoded.   "=>" 'SGVsbG8gV29ybGQ='