Skip to content

All Functions

Kitsune langauge provides these system level functions for language utility.

functions

FunctionFunction Description
length()Returns the length of the string (number of characters) or count of array elements.
indexOf(string)indexOf(search_string) Returns the zero-based index of the first occurrence of the specified character/string in this current.
indexOf(string, int)indexOf(search_string, start_index) This function returns the position of the first occurrence of a specified value in a string, starting with specified index.
substr(int)substr(start_index) Retrieves a substring from current string. The substring starts at a specified index number and continues to the end of the string.
substr(int, int)substr(start_index, length) Retrieves a substring from current string. The substring starts at a specified character position and has a specified length
toupper()Returns a copy of current string converted to uppercase.
tolower()Returns a copy of current string converted to lowercase.
tonumber()Converts the string to number. If the parsing fails, it returns null.
urlencode()Returns a copy of current string with url encoding. It will remove special characters and replace space with '-'(hyphen)
split(string)Splits a string into array of substrings that are based on the characters/string provided in the input.
contains(string)Returns true/false based on the input string is present in the current string. it will search case insensitive.
replace(string, string)replace(old_string, new_string) Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.
decode()Returns a copy of current string by html decoding.
view(pagename)View function
partial(pagename)Partial function