Class StdLib
- Namespace
- TabScript
- Assembly
- TableScript.dll
Standard library with useful things. Some things could be replicated with the language, but this implementation in recomended for speed. All functions have the same name in the code and in here
public static class StdLib
- Inheritance
-
StdLib
- Inherited Members
Properties
AllFunctions
public static (Delegate func, string description)[] AllFunctions { get; }
Property Value
- (Delegate func, string description)[]
AsImport
public static ResolvedImport AsImport { get; }
Property Value
Methods
deleteAll(Table, Table)
Delete all matching elements from a table
public static Table deleteAll(Table self, Table toDel)
Parameters
Returns
deleteAt(Table, Table)
Delete element at an index
public static Table deleteAt(Table self, Table index)
Parameters
Returns
error(string)
Print to Standard Error
public static void error(string t)
Parameters
tstring
getDate()
Get date and hour in [yy, MM, dd, hh, mm, ss] format
public static Table getDate()
Returns
getOS()
Get the operating system
public static string getOS()
Returns
indexOf(Table, string)
Find the index of an element
public static Table indexOf(Table self, string element)
Parameters
Returns
input(string)
Read from Standard Input
public static Table input(string prompt)
Parameters
promptstring
Returns
join(Table, string)
Join all elements of a table with a seperator between them
public static string join(Table self, string separator)
Parameters
Returns
lower(Table)
Transform all elements to lowercase
public static Table lower(Table self)
Parameters
selfTable
Returns
print(string)
Print to Standard Output
public static void print(string t)
Parameters
tstring
repeat(Table, int)
Repeat some elements x times
public static Table repeat(Table self, int times)
Parameters
Returns
replace(Table, Table, Table)
Replace a set of substrings by their replacement
public static Table replace(Table self, Table originals, Table replacements)
Parameters
Returns
reverse(Table)
Reverse the order of a table
public static Table reverse(Table self)
Parameters
selfTable
Returns
shuffle(Table)
Shuffle randomly the order of a table
public static Table shuffle(Table self)
Parameters
selfTable
Returns
sleep(int)
Sleep x miliseconds
public static void sleep(int ms)
Parameters
msint
split(Table, Table)
Split all elements of a table by multiple separators
public static Table split(Table self, Table separators)
Parameters
Returns
trim(Table)
Trim whitespace from all elements
public static Table trim(Table self)
Parameters
selfTable
Returns
upper(Table)
Transform all elements to uppercase
public static Table upper(Table self)
Parameters
selfTable