-
Notifications
You must be signed in to change notification settings - Fork 2
Base Class Library
This is a temporary page highlighting the most important funtions in the Base Class Library (BCL).
The BCL defines the following objects:
Argument | Expected Type | Description |
---|---|---|
num | number | The number to get the absolute value of. |
Description: Returns the absolute value of number.
Returns: number
Argument | Expected Type | Description |
---|---|---|
source | 1D array | The source array. |
source_index | number | The starting index to copy from the source array. |
destination | 1D array | The destination array. |
destination_index | number | The starting index of the destination to copy to. |
length | number | The number of elements to copy. |
Description: Copies the elements from the source array into the destination array, resizing the destination if needed.
Returns: null
Argument | Expected Type | Description |
---|---|---|
length | number | The size of the array. |
Description: Creates an array of the given length.
Returns: array
Argument | Expected Type | Description |
---|---|---|
array1 | 1D array | The first array to compare. |
array2 | 1D array | The second array to compare. |
Description: Determines if the elements in array1 are equal to the elements in array2.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
array | 2D array | The 2D array to get the height of. |
Description: Returns the length of the first rank of the given array.
Returns: number
Argument | Expected Type | Description |
---|---|---|
array | 1D array | The 1D array to get the length of. |
Description: Returns the length of the array.
Returns: number
Argument | Expected Type | Description |
---|---|---|
array | 2D array | The 2D array to get the length of. |
n | number | The index of the first dimension to get the length of. |
Description: Returns the length of a second dimension of an array.
Returns: number
Argument | Exepcted Type | Description |
---|---|---|
str | string | The string to decode. |
Description: Decodes a 64 bit encoded string.
Returns: string
Argument | Exepcted Type | Description |
---|---|---|
str | string | The string to encode. |
Description: Converts a string into a base64 format encoded string.
Returns: string
Argument | Expected Type |
---|---|
name | string |
..args | objects |
Description: Calls the specified script with the given arguments.
Returns: object
Argument | Expected Type | Description |
---|---|---|
target | instance | The target of the script. The function will act as this instance called it, even if this instance doesn't define the script. |
declaring_type | string | The type that defines the script, including the namespace. |
script_name | string | The name of the script. |
..args | objects | The arguments to pass to the script. |
Description: Calls the specified script declared by the specified type as if the target called it with the given arguments.
Returns: object
Argument | Expected Type | Description |
---|---|---|
value | number | The value to round up. |
Description: Returns value rounded up to the nearest integer.
Returns: number
Argument | Expected Type | Description |
---|---|---|
..args | objects | Any number of arguments to choose from. |
Description: Takes any number of arguments and returns one at random.
Returns: object
Argument | Expected Type | Description |
---|---|---|
value | number | The value to clamp. |
min | number | The minumum possible value. |
max | number | The maximum possible value. |
Description: Returns a value clamped in between the min and max values.
Returns: number
Argument | Expected Type | Description |
---|---|---|
str | string | The name of the environment variable to get. |
Description: Retrieves the value of an environment variable from the current process.
Returns: string
Argument | Expected Type | Description |
---|---|---|
value | number | The value to round down. |
Description: Returns value rounded down to the nearest integer.
Returns: number
Argument | Expected Type | Description |
---|---|---|
type | string | The type to create. |
..args | objects | The arguments to pass to the create script. |
Description: Creates a new instance of the specified type.
Returns: instance
Argument | Expected Type | Description |
---|---|---|
value | object | The object to determine is an array or not. |
Description: Determines if value is an array.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
value | object | The object to determine is a number or not. |
Description: Determines if value is a number.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
value | object | The object to determine is a string or not. |
Description: Determines if value is a string.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
value | object | The object to determine is a delegate or not. |
Description: Determines if value is a delegate.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
value | object | The object to determine is null or not. |
Description: Determines if value is null.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
..args | numbers | Any amount of numbers. |
Description: Returns the argument with the highest value.
Returns: number
Argument | Expected Type | Description |
---|---|---|
..args | numbers | Any amount of numbers. |
Description: Returns the argument with the lowest value.
Returns: number
Argument | Expected Type | Description |
---|---|---|
n | number | The upper bound of the random number to generate. |
Description: Returns a random value between 0 and n (upper bound exclusive).
Returns: number
Description: Gets the seed used to start the current random number generator.
Returns: number
Argument | Expected Type | Description |
---|---|---|
min | number | The minumum number to generate (inclusive). |
max | number | The maximum number to generate (exclusive). |
Description: Returns a number in between min and max (min inclusive, max exclusive).
Returns: number
Argument | Expected Type | Description |
---|---|---|
seed | number | The seed to set for the random number generator. |
Description: Sets the seed used to start the random number generator.
Returns: null
Description: Randomly seeds the random number generator.
Returns: null
Argument | Expected Type | Description |
---|---|---|
str | string | The string to convert into a number. |
Description: Converts a string into a number value.
Returns: number
Argument | Expected Type | Description |
---|---|---|
value | number | The number to round. |
Description: Rounds value to the nearest integer.
Returns: number
Argument | Expected Type | Description |
---|---|---|
name | string | The name of the global script. |
Description: Determines if a global script with the given name exists.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
message | string | A description of the error. |
throw | bool | Whether to throw the program with an error, or just write to the console. |
Description: Outputs an error message, optionally terminating the program.
Returns: null
Argument | Expected Type | Description |
---|---|---|
value | object | The value to convert to a string. |
Description: Converts value to a string.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to get a character from. |
index | number | The index of character to get. |
Description: Gets the character in a string at the given index.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to copy. |
start | number | The index to start copying from. |
count | number | The number of characters to copy. |
Description: Copies a portion of a string.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to search. |
sub_string | string | The string to search for. |
Description: Gets the number of occurrences of the sub-string in the source.
Returns: number
Argument | Expected Type | Description |
---|---|---|
str | string | The string to remove characters from. |
index | number | The index to start removing characters from. |
count | number | The number of characters to remove. |
Description: Returns a copy of str deleting a portion of the characters.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to get all of the digits from. |
Description: Returns the string with all non-digit characters removed.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to insert into. |
sub_str | string | The string to insert. |
index | number | The index in the source to insert the substring. |
Description: Inserts the sub-string into the source at the given index and returns the result.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to get the length of. |
Description: Returns the length of the given string.
Returns: number
Argument | Expected Type | Description |
---|---|---|
str | string | The string to get all letter characters from. |
Description: Returns the string with all non-letter charaters removed.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to get all letters and numbers from. |
Description: Returns the string with all non-letter and non-digit characters removed.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to turn lowercase. |
Description: Returns the string with all letters converted to lower case.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to get the ordinal value from. |
index | number | The index of the character to get the ordinal value of. |
Description: Returns the ordinal value of the character at the specified index.
Returns: number
Argument | Expected Type | Description |
---|---|---|
str | string | The string to search. |
sub_string | string | The string to search for. |
Description: Searches the source for the specified sub string and returns the index it was found, or -1 if it wasn't found.
Returns: number
Argument | Expected Type | Description |
---|---|---|
str | string | The string to repeat. |
count | number | The number of times the string should be repeated. |
Description: Creates a string with the input repeated a number of times equal to count.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to search. |
sub_str | string | The string to remove. |
new_str | string | The string to add. |
Description: Replaces the first occurrence of sub_str with new_str in the source string.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to search. |
sub_str | string | The string to remove. |
new_str | string | The string to add. |
Description: Replaces all occurrences of sub_str with new_str in the source string.
Returns: string
Argument | Expected Type | Description |
---|---|---|
str | string | The string to turn uppercase. |
Description: Returns the string with all letters converted to upper case.
Returns: string
Argument | Expected Type | Description |
---|---|---|
value | object | The value to get the type of. |
Description: Returns the type of the given value.
Returns: string
Argument | Expected Type | Description |
---|---|---|
name | string | The name of the global variable. |
Description: Determines if a global variable with the given name exists.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
name | string | The name of the global variable to get. |
Description: Gets the global variable with the given name.
Returns: object
Description: Gets an array of all of the currently defined global variable names.
Returns: 1D array
Argument | Expected Type | Description |
---|---|---|
name | string | The name of the global variable to set. |
value | object | The value to set the variable to. |
Description: Sets the global variable with the specified name to the given value.
Returns: null
Argument | Expected Type | Description |
---|---|---|
inst | instance | The instance to check. |
name | string | The name of the variable to check. |
Description: Determines if a variable with the given name exists on the given instance.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
inst | instance | The instance to get the value from. |
name | string | The name of the variable to get. |
Description: Gets the variable with the given name from the specified instance.
Returns: object
Argument | Expected Type | Description |
---|---|---|
inst | instance | The instance to get the variable names from. |
Description: Gets an array of the names of all of the variables defined by the specified instance.
Returns: 1D array
Argument | Expected Type | Description |
---|---|---|
inst | instance | The instance to set the variable on. |
name | string | The name of the variable to set. |
value | object | The value to set the variable to. |
Description: Sets the variable with the given name on the specified instance to the given value.
Returns: null