Returns a Unicode character value of the first character. With the optional parameter index, you can also return the code for a different character in the string. The index parameter starts at 1.
number uAsc(value, index)
An input string.
Character position for reading ASCII value.
To get a Unicode value from a string:
uAsc("Big Ben") // returns 66
uAsc("Big Ben", 2) // returns 105
Similar to the common chr function but returns the Unicode character specified by the number given. In addition you can also specify more than one character and unicode escape sequences in order to create a string.
string uChr(params, ...)
A list of expressions or values.
To create a Unicode string from char values:
What you will see:
uChr(64) // returns "@"
uChr("\u0064\u006f\u0067") // returns "dog"
uChr(65, "pple ") // returns "apple"
Returns the capitalized representation of a string. In other words, the first letter of each and every word in the string is capitalized.
string uCap(text )
The string to be capitalized.
To capitalize a string:
uCap(‘fArmeR, ASTROnaut’) // returns ‘Farmer, Astronaut’
uCap(‘the first weekend’) // returns ‘The First Weekend’
Returns the concatenation of all input parameters.
string uConcat(params, ...)
A list of expressions or values of any datatype.
To concatenate a string:
uConcat(“For “, 3, “ years.”) returns “For 3 years.”
Concatenates a delimited string respecting NULL values. All parameters are concatenated using the value in the first parameter as delimiter. If the second parameter is not zero, empty parameters are treated as normal; otherwise, they are ignored.
Error codes: none
string uJoin(delimiter, allowEmpty, params, ...)
Delimiter to be used between all other string parts.
Flag (0/1) indicating if we allow empty fields.
List of strings to concatenate.
To create a delimited string:
uJoin("-", 1, "James", "", "Tiberius", "Kirk") // returns "James--Tiberius-Kirk"
uJoin("-", 0, "James", "", "Tiberius", "Kirk") // returns "James-Tiberius-Kirk"
Returns the leftmost N characters from a string
string uLeft(input, chars)
The input string.
The amount of characters to be retrieved.
To get the leftmost part of a string:
uLeft("James T. Kirk", 5) // returns "James"
uLeft(null, 5) // returns null
Returns the length of a string
String uLength(input)
The input string.
To get the length of a string:
uLength("James T. Kirk") // returns 13
Returns a part of a string starting at a character position with a length of length.
string uSubstr(input, position, length)
The input string.
The position where to start reading.
The number of characters to read.
To get a substring out of a string:
uSubstr("James T. Kirk", 7, 2) // returns "T."
Returns the position of a substring within a string. A result of zero indicates that the substring has not been found
string uLPos(input, substring)
The input string.
The substring to search.
To find the first occurrence of a substring:
uLPos("James T. Kirk", "T") //returns 7
Returns the input string in lowercase letters.
string uLower(input); string input;
The input string.
To convert a string into lowercase letters:
uLower(“James T. Kirk”) // returns “james t. kirk”
Fills the left side of a string up to a specified length. By default, the string is stuffed with spaces (ASCII 32).
string uLStuff(input, length, [ stuff)
The input string.
New length of string.
String to append, default is an empty space (ASCII 32).
To expand a string by filling its left side:
uLStuff(“3.5”, 5) // returns “ 3.5”
uLStuff(“3.5”, 5, 5, “0”) // returns “0003.5”
Removes characters from the left side of the string. If the second parameter is omitted, it defaults to space (ASCII 32).
string uLTrim(input, trimstring)
The input string.
The string to trim.
To trim a string on the left side:
uLTrim(" 3.5") // returns "3.5"
uLTrim("003.5", "0") // returns "3.5"
Returns the given string repeated N times.
string uRepeat(input, repeats)
The string to be repeated.
The number of times to repeat the input string.
To repeat a string multiple times:
uRepeat("Hello ", 4) // returns "Hello Hello Hello Hello "
Replaces parts of a string.
string uReplace(input, search, replace)
The string to worked on.
The pattern to be searched.
The string that will replace any match.
To search and replace patterns of a string:
uReplace("At four o' clock he became four", "four", "4") // returns "At 4 o' clock he became 4"
Reverses a string.
string uReverse(input)
The string to reverse.
To search and replace patterns of a string:
uReverse("Smith”) // returns "htimS”
Returns the rightmost N characters from a string.
string uRight(input, chars)
The input string.
The number of chars to be read.
To get the rightmost part of a string:
uRight("James T. Kirk", 4) // returns "Kirk"
uRight(null, 5) / / returns null
Returns the position of a substring within a string. A result of zero indicates that the substring has not been found.
string uRPos(input, substring)
The input string.
The substring to find.
To find the last occurrence of a substring:
uRPos("James T. Kirk", "T") //returns 7
Fills the right side of a string up to specified length. By default, the string is stuffed with spaces (ASCII 32).
string uRStuff(input, length, stuffstring)
The input string.
The new length of the result string.
The string to append.
To expand a string by filling its right side:
uRStuff("3.5", 5) // returns "3.5 "
uRStuff("3.5", 5, "0") // returns "3.500"
Removes characters from the right side of the string. If the second parameter is omitted, it defaults to spaces (ASCII 32).
string uRTrim(input, trimstring)
The input string.
The string to trim.
To trim a string on the right side:
uRTrim("3.5 ") // returns "3.5"
uRTrim("3.500", "0") // returns "3.5"
Removes characters from both sides of the string. If the second parameter is omitted, it defaults to spaces (ASCII 32).
string uTrim(input, trimstring)
The input string.
The string to trim.
To trim a string on both sides:
uTrim(" 3.5 ") // returns "3.5"
uTrim("003.500", "0") // returns "3.5"
Returns the input string in uppercase letters
string uUpper(input)
The input string.
To convert a string into uppercase letters:
uUpper("James T. Kirk") // returns "JAMES T. KIRK"