cleanup, docs

This commit is contained in:
root
2026-06-16 23:02:45 +00:00
parent ea08d5f28b
commit b8b56cf3dd
160 changed files with 1076 additions and 511 deletions
+9 -17
View File
@@ -1,24 +1,16 @@
:sig
String base64_decode(String raw, bool& ok)
String base64_decode(String raw)
:params
raw : Base64 encoded string
ok : set to `true` when decoding succeeds; set to `false` for invalid input
return value : decoded binary-safe string, or an empty string when decoding fails
:see
>string
base64_encode
raw : Base64-encoded text
return value : the decoded bytes (empty on invalid input)
:content
Decodes a Base64 string.
Pass a `bool` variable for `ok` so callers can distinguish invalid input from a valid empty decoded value.
Example:
Decodes Base64 text back to bytes. Pairs with `base64_encode()` for round-tripping binary data through text channels.
:example
bool ok = false;
print(base64_decode("aGVsbG8=", ok), " ", ok ? "ok" : "bad", "\n");
print(base64_decode("aGVsbG8="), "\n");
:see
>uri
base64_encode