Strings

string str_slice( string str , int start [, int end] )

str string The string to be sliced.
start int The starting position of the slice.
end int The end position of the slice.
Returns a string slice of a string from start to end.

string str_substr( string str , int start [, int length] )

str string The string to be sliced.
start int The starting position of the slice.
length int The length of the slice.
Returns a string slice of a string from a position and given length.

int str_length( string str )

str string The string thats length will be returned.
Returns the number of characters in the string.

bool str_compare( string strA , string strB )

strA string The string that's going to be compared to strB.
strB string The string that's going to be compared to strA.
Returns a value <0 if strA is less than strB, a value>0 if strA is greater than strB or 0 if strA is equal to strB.

int str_find( string str , string subStr [, int start = 0] )

str string The string to be searched.
subStr string The substring of the string to be searched inside the string.
start int The starting index for which subStr will be searched inside the string.
Returns the index of the first occurance of subStr within str, starting at index start.

int str_find_last( string str , string subStr [, int start = 0] )

str string The string to be searched.
subStr string The substring to be searched inside the string.
start int The starting index for which subStr will be searched inside the string.
Returns the index of the last occurance of subStr within str, starting at index start.

bool str_contains( string str , string subStr )

str string The string to be searched.
subStr string The substring to be searched inside the string.
Returns true if str contains subStr.

bool str_starts_with( string str , string subStr )

str string The string to be searched.
subStr string The substring to be searched inside the string.
Returns true if str starts with subStr.

bool str_ends_with( string str , string subStr )

str string The string to be searched.
subStr string The substring to be searched inside the string.
Returns true if str ends with subStr.

string str_to_upper( string str )

str string The string to be uppercased.
Returns str converted to uppercase.

string str_to_lower( string str )

str string The string to be lowercased.
Returns str converted to lowercase.

string str_trim( string str )

str string The string to be trimmed.
Returns str with all leading and trailing whitespace characters removed.

array str_split( string str [, string separator] )

str string The string to be split.
separator string The substring that the string is split by.
Returns an array of strings that contains the substrings in str deliminated by separator.

array str_to_char( string str [, int index = 0] )

str string The char to be converted.
index int The index of the char to be returned inside str.
Returns str converted a single character code.

array str_to_chars( string str )

str string The string to be converted.
Returns str converted to an array containing the character codes of each string.

string str_join( string delimiter , array pieces )

delimiter string The string that separates each of the elements in the array
pieces array An array containing the pieces to be joined
Returns the elements of pieces concatened together with delimiter inserted between each substring.

string str_from_char( int char )

char int The character code to be converted.
Returns a string of length 1 consisting of a single character code.

string str_from_chars( array chars )

chars array The array containing the character codes to be converted.
Creates a string from an array of character codes.