lib:datatools
DataTools
The datatools library adds extra utilities for working with different data types like strings and tables. It is always loaded by the datatools kernel module and adds to the native string and table globals.
table.find(haystack: table, needle: any): any or nil
Finds needle in haystack and returns its key or nil.
table.copy(original: table): table
Recursively copies a table and returns the identical copy.
convert(amount: number, fromUnit: string, toUnit: string): number or nil, string
Converts from one unit to another unit. Returns false and an error message if it fails. Supported units:
- Bytes - B to GB
- Bibytes - B to GiB
lib/datatools.txt · Last modified: by wahplus
