Skip to content

Commit 86578d6

Browse files
authored
Document rawlen (#59)
1 parent 2d33fe8 commit 86578d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_pages/library.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ function rawget<K, V>(t: { [K]: V }, k: K): V?
8080

8181
Performs a table lookup with index `k` and returns the resulting value, if present in the table, or nil. This operation bypasses metatables/`__index`.
8282

83+
```
84+
function rawlen<K, V>(t: { [K]: V } | string): number
85+
```
86+
87+
Returns the raw length of the table or string. If it is a string, this operation is identical to `#str` or `string.len(str)`. This operation bypasses metatables/`__len`.
88+
8389
```
8490
function rawset<K, V>(t: { [K] : V }, k: K, v: V)
8591
```

0 commit comments

Comments
 (0)