Skip to content

Commit 5758e11

Browse files
committed
utf8.offset
1 parent 0a39620 commit 5758e11

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/Runtime Environment/Global & Base.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,14 @@ end
189189
--> B
190190
--> C
191191
```
192+
193+
---
194+
### `utf8.offset`
195+
This function is modified to have an additional return value, the end position of the character:
196+
```lua
197+
print(select(2, utf8.offset("", 1))) --> 3
198+
print(#"") --> 3
199+
```
200+
:::info
201+
We are documenting this for the sake of completeness of in regards to "changes from Lua 5.4", but this patch is actually backported from Lua 5.5.
202+
:::

0 commit comments

Comments
 (0)