This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
api:transforms [2016/06/20 17:24] payonel created |
api:transforms [2016/06/20 17:25] payonel |
||
---|---|---|---|
Line 4: | Line 4: | ||
The transforms library is set of utilities for working with indexed tables. It provides highly reusable special iterators that are at the core of `text` and `sh` command parsing. | The transforms library is set of utilities for working with indexed tables. It provides highly reusable special iterators that are at the core of `text` and `sh` command parsing. | ||
- | * ''transforms.sub(tbl, first, last) table'' | + | Methods |
+ | --------------------------- | ||
+ | * ''transforms.sub(tbl: table, first: number, last: number or nil) table'' | ||
Functions identically to `string.sub`, even supporting negative indexes. Returns a sub table of `tbl` from `first` to `last`. Like `string.sub`, `first` and `last` can be negative indexes, and `last` can be omitted to include "the rest". | Functions identically to `string.sub`, even supporting negative indexes. Returns a sub table of `tbl` from `first` to `last`. Like `string.sub`, `first` and `last` can be negative indexes, and `last` can be omitted to include "the rest". | ||
Line 15: | Line 17: | ||
* ''transforms.at'' | * ''transforms.at'' | ||
+ | Contents | ||
+ | ----------- | ||
+ | {{page>api:contents&noheader&noeditbutton&nouser&nofooter}} |