Table of Contents

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

ResolvedImport

Methods

deleteAll(Table, Table)

Delete all matching elements from a table

public static Table deleteAll(Table self, Table toDel)

Parameters

self Table
toDel Table

Returns

Table

deleteAt(Table, Table)

Delete element at an index

public static Table deleteAt(Table self, Table index)

Parameters

self Table
index Table

Returns

Table

error(string)

Print to Standard Error

public static void error(string t)

Parameters

t string

getDate()

Get date and hour in [yy, MM, dd, hh, mm, ss] format

public static Table getDate()

Returns

Table

getOS()

Get the operating system

public static string getOS()

Returns

string

indexOf(Table, string)

Find the index of an element

public static Table indexOf(Table self, string element)

Parameters

self Table
element string

Returns

Table

input(string)

Read from Standard Input

public static Table input(string prompt)

Parameters

prompt string

Returns

Table

join(Table, string)

Join all elements of a table with a seperator between them

public static string join(Table self, string separator)

Parameters

self Table
separator string

Returns

string

lower(Table)

Transform all elements to lowercase

public static Table lower(Table self)

Parameters

self Table

Returns

Table

print(string)

Print to Standard Output

public static void print(string t)

Parameters

t string

repeat(Table, int)

Repeat some elements x times

public static Table repeat(Table self, int times)

Parameters

self Table
times int

Returns

Table

replace(Table, Table, Table)

Replace a set of substrings by their replacement

public static Table replace(Table self, Table originals, Table replacements)

Parameters

self Table
originals Table
replacements Table

Returns

Table

reverse(Table)

Reverse the order of a table

public static Table reverse(Table self)

Parameters

self Table

Returns

Table

shuffle(Table)

Shuffle randomly the order of a table

public static Table shuffle(Table self)

Parameters

self Table

Returns

Table

sleep(int)

Sleep x miliseconds

public static void sleep(int ms)

Parameters

ms int

split(Table, Table)

Split all elements of a table by multiple separators

public static Table split(Table self, Table separators)

Parameters

self Table
separators Table

Returns

Table

trim(Table)

Trim whitespace from all elements

public static Table trim(Table self)

Parameters

self Table

Returns

Table

upper(Table)

Transform all elements to uppercase

public static Table upper(Table self)

Parameters

self Table

Returns

Table