Prefixed by std
Takes in any value and prints it to the console. Does not add a new line afterwards.
Example:
std::print("Hello, world!")
Output:
Hello, world!
Takes in any value and prints it to the console. Adds a new line afterwards.
Example:
std::print("Hello, world!")
Output:
Hello, world! [\n]
Requests input from the console. Returns a string of the data that was inputted.
Example:
const in = input()
std::println(in)
Input:
example
Output:
example
Requests input from the console, with a given message. Returns a string of the data that was inputted.
Example:
const in = inputMessage("Input anything here > ")
std::println(in)
Input:
Input anything here > example
Output:
example
Adds value
to the given list
.
Example:
const list = [1, 2, 3]
std::println(list)
std::add(list, 4)
std::println(list)
Output:
[1, 2, 3]
[1, 2, 3, 4]
Removes the element at the given index
of the given list
.
Example:
const list = [1, 2, 3]
std::println(list)
std::remove(list, 2)
std::println(list)
Output:
[1, 2, 3]
[1, 2]
Gets and returns element at the given index
of the given list
.
Example:
const list = [1, 2, 3]
std::println(std::get(list, 2))
Output:
3
Adds all the elements from list_b
to list_a
.
Example:
const list_a = [1, 2, 3]
const list_b = [4, 5, 6]
std::println(list_a)
std::println(list_b)
std::combineLists(list_a, list_b)
std::println(list_a)
Output:
[1, 2, 3]
[4, 5, 6]
[1, 2, 3, 4, 5, 6]
Checks if the given value
is an instance of a number.
Example:
const a = 5
const b = "example"
std::println(std::isNumber(a))
std::println(std::isNumber(b))
Output:
1
0
Checks if the given value
is an instance of a string.
Example:
const a = 5
const b = "example"
std::println(std::isString(a))
std::println(std::isString(b))
Output:
0
1
Checks if the given value
is an instance of a method.
Example:
const a = meth() -> std::println("hello, world!")
const b = "example"
std::println(std::isMethod(a))
std::println(std::isMethod(b))
Output:
1
0
Checks if the given value
is an instance of a list.
Example:
const a = [1, 2, 3]
const b = "example"
std::println(std::isList(a))
std::println(std::isList(b))
Output:
1
0
Converts the given string to a number.
Example:
const a = "5"
const b = stringToNumber(a)
std::println(b + 5)
Output:
10
Converts the given string to binary.
Example:
const a = "true"
if std::stringToBool(a) {
std::println("Example")
}
Output:
Example
Deletes a value from the current symbol table.
Example:
const a = 5
std::println(a)
std::delete(a)
std::println(a) // throws error
Output:
5
[error]
Exits the program with the given status code.
Example:
std::exit(0)
Output:
Process finished with exit code 0
Gets and returns the type of the value
Example:
std::println(std::type("example"))
Output:
string
Checks if two strings are equal, case-insensitively.
Example:
std::println(std::equalsIgnoreCase("eXaMpLe", "ExAmPlE"))
Output:
1