mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add utf8 library docs
This commit is contained in:
parent
ce7698e9ee
commit
bd60d05c3a
4 changed files with 38 additions and 0 deletions
18
doc/ru/scripting/builtins/libutf8.md
Normal file
18
doc/ru/scripting/builtins/libutf8.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Библиотека *utf8*
|
||||
|
||||
Библиотека предоставляет функции для работы с UTF-8.
|
||||
|
||||
```lua
|
||||
-- Конвертирует UTF-8 строку в Bytearray или массив чисел если
|
||||
-- второй аргумент - true
|
||||
utf8.tobytes(text: str, [опционально] usetable=false) -> Bytearray|table
|
||||
|
||||
-- Конвертирует Bytearray или массив чисел в UTF-8 строку
|
||||
utf8.tostring(bytes: Bytearray|table) -> str
|
||||
|
||||
-- Возвращает длину юникод-строки
|
||||
utf8.length(text: str) -> int
|
||||
|
||||
-- Возвращает код первого символа строки
|
||||
utf8.codepoint(chars: str) -> int
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue