docs: baked a lot of API docs
This commit is contained in:
+58
-1
@@ -6,4 +6,61 @@ references:
|
||||
|
||||
The `encoding` namespace converts between strings, byte buffers, Base64, and UTF-8.
|
||||
|
||||
${spacelua.renderApiDocumentation("encoding")}
|
||||
<!--#lua spacelua.renderApiDocumentation("encoding") -->
|
||||
## encoding.base64Decode
|
||||
|
||||
`encoding.base64Decode(encoded)`
|
||||
|
||||
Decodes a Base64 string into a byte buffer.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- `encoded` (`string`)
|
||||
|
||||
**Returns:**
|
||||
|
||||
- `bytes` — Decoded bytes.
|
||||
|
||||
## encoding.base64Encode
|
||||
|
||||
`encoding.base64Encode(data)`
|
||||
|
||||
Encodes a string or byte buffer as Base64.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- `data` (`string|bytes`)
|
||||
|
||||
**Returns:**
|
||||
|
||||
- `string` — Base64-encoded data.
|
||||
|
||||
## encoding.utf8Decode
|
||||
|
||||
`encoding.utf8Decode(data)`
|
||||
|
||||
Decodes a UTF-8 byte buffer into a string.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- `data` (`bytes`)
|
||||
|
||||
**Returns:**
|
||||
|
||||
- `string` — Decoded text.
|
||||
|
||||
## encoding.utf8Encode
|
||||
|
||||
`encoding.utf8Encode(value)`
|
||||
|
||||
Encodes a UTF-8 string into a byte buffer.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- `value` (`string`)
|
||||
|
||||
**Returns:**
|
||||
|
||||
- `bytes` — UTF-8 encoded bytes.
|
||||
<!--/lua-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user