natiny.input.get_char_at
natiny.input.get_char_at(index) -> codepoint
Returns the Unicode code point from the current frame text-input buffer at the specified index.
Parameters
| Name | Type | Description |
|---|---|---|
index |
number |
Zero-based character index |
Returns
| Type | Description |
|---|---|
number |
Unicode code point, or 0 for an invalid index |
Example
local cp = natiny.input.get_char_at(0)
if cp ~= 0 then
print("first code point:", cp)
end