Header

None

In this page we list the available built-in functions, along with possible short description. The built-in functions are all "core"-functions. They have the namespace "core" as their root-namespace. For example: "core:string:trim()" is same as "string:trim()".

String-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
string:contains(StringType) <BooleanType> & returns \textit{true} if given string is found from the input-value, otherwise returns \textit{false}\\ \hline
string:endsWith(StringType) <BooleanType> & returns \textit{true} if the given string-argument is found from the end of the input-string, otherwise returns \textit{false}\\ \hline
string:fromBase64() <StringType> & Converts Base64-value into String-value\\ \hline
string:length() <NumberType> & Returns the length of the input-string \\ \hline
string:lowerCase() <StringType> & Converts uppercase-characters into lowercase, applying this for the whole string \\ \hline
string:search(StringType) <ArrayType> & Returns the list of indexes where the searched string-item occurs. \\ \hline
string:splitBy(StringType) <StringType> & Splits the string into two parts based on the given string-parameter. The splitting string will be omitted from the output \\ \hline
string:startsWith(StringType) <BooleanType> & returns \textit{true} if the given string-argument is found from the start of input-string, otherwise returns \textit{false}\\ \hline
string:substring(NumberType, NumberType) <StringType> & Params are start-index and end-index. The end-index is exclusive.\\ \hline
string:toBase64() <StringType> & Converts input-string into Base64-representation \\ \hline
string:trim() <StringType> & Removes whitespace from the beginning and the end of the given string.\\ \hline
string:upperCase() <StringType> & Converts lowercase-characters into lowercase, applying this for the whole string\\ \hline
string:replaceFirst(\$a, \$b) <StringType> & Replace first occurance of string\\ \hline
string:replaceAll(\$a, \$b) <StringType> & Replace all occurances of string\\ \hline

  • padLeft
  • padRight

Object-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
object:count() <NumberType> & Returns the number of items found from the object's top-level\\ \hline
object:key() <NumberType> & Returns the name of the key of the particular value that is being handled\\ \hline
object:keys() <ArrayType> & Returns the keys from the object's current-level\\ \hline
object:value() <JsonType> & Returns the value of currently handled object-item\\ \hline
object:remove(\$key) <ObjectType> & Remove given key\\ \hline
object:rename(\$key) <ObjectType> & Rename given key\\ \hline
\end{tabular}

Array-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
array:avg() <NumberType> & \\ \hline
array:count() <NumberType> & \\ \hline
array:distinct() <ArrayType> & \\ \hline
array:first(count: NumberType) & \\ \hline
array:flatten() <ArrayType> & \\ \hline
array:forAll(test: expr | FunctionRef | LambdaFunctionRef) <BooleanType> & When Lambda is used, the parameter must be named as \$a\\ \hline
array:forAtLeast(count: NumberType, test: expr | FunctionRef | LambdaFunctionRef) <BooleanType> & When Lambda is used, the parameter must be named as \$a\\ \hline
array:forAtMost(count: NumberType, test: expr | FunctionRef | LambdaFunctionRef) <BooleanType> & When Lambda is used, the parameter must be named as \$a\\ \hline
array:forEach(expr: expr | FunctionRef | LambdaFunctionRef) & \\ \hline
array:get(index: NumberType) & \\ \hline
array:last(count: NumberType) & \\ \hline
array:max() <NumberType> & \\ \hline
array:min() <NumberType> & \\ \hline
array:reduce(expr | FunctionRef | LambdaFunctionRef) & When Lambda is used, the first parameter must be named as \$a, and the second \$b. If expr is used, then the current-value @ is assigned with object: {a: value1, b: value2} \\ \hline
array:sum() <NumberType> & \\ \hline
\end{tabular}

Date-functions


\begin{tabular}{ p{6cm} | p{6cm} }
\textbf{Function signature} & \textbf{Description} \\ \hline
date:add() <ObjectType> & \\ \hline
date:now() <ObjectType> & \\ \hline
date:fromMillis() <ObjectType> & \\ \hline
date:toMillis() <NumberType> & \\ \hline
\end{tabular}

Math-functions


\begin{tabular}{ p{6cm} | p{6cm} }
\textbf{Function signature} & \textbf{Description} \\ \hline
math:abs() <NumberType> & \\ \hline
math:acos() <NumberType> & \\ \hline
math:asin() <NumberType> & \\ \hline
math:atan() <NumberType> & \\ \hline
math:ceil() <NumberType> & \\ \hline
math:cos() <NumberType> & \\ \hline
math:exp() <NumberType> & \\ \hline
math:floor() <NumberType> & \\ \hline
math:log() <NumberType> & \\ \hline
math:pow(exp: NumberType) <NumberType> & \\ \hline
math:round() <NumberType> & \\ \hline
math:sin() <NumberType> & \\ \hline
math:sqrt() <NumberType> & \\ \hline
math:tan() <NumberType> & \\ \hline
\end{tabular}

Random-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
random:number() <NumberType> & \\ \hline

Env-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
env:get() <StringType> & Get the environment-variable from system. This might be moved later into core-namespace. \\ \hline

Function-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
function:fullName() <StringType> & \\ \hline
function:name() <StringType> & \\ \hline
function:namespace() <StringType> & \\ \hline

State-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
state:get() & \\ \hline
state:set() & \\ \hline

Binary-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
binary:base64ToBinary() <ObjectType> & \\ \hline
binary:binaryToBase64() <ObjectType> & \\ \hline

Stream-functions

Core-functions


\textbf{Function signature} & \textbf{Description} \\ \hline
boolean() <BooleanType> & \\ \hline
number(\$precision?) <NumberType> & \\ \hline
string(\$separator?) <StringType> & \\ \hline
pos() <NumberType> & \\ \hline
parent() <ObjectType> & \\ \hline
root() <ObjectType> & \\ \hline
next() & \\ \hline
previous() & \\ \hline
getCarvedBytesById() & \\ \hline
type() <StringType> & \\ \hline
mappableTo() <BooleanType> & \\ \hline
fullyMappableTo() <BooleanType> & \\ \hline