left()
left("race result";4) - returns race
left([LastName];1) - returns the first character of the last name
right()
right has two parameters, a string and a number n, and returns the last n characters of the string. For example:
right("race result";4) - returns sult
right([LastName];1) - returns the last character of the last name
mid()
mid("race result"; 6; 3) - returns resinstr()
instr returns the position of the first occurence of a substring in a string. The first parameter determines where to start searching.
instr(1;"race result";" ") - returns 5
instr(2;"ab";"a") - returns 0, since there is no a if searching from the second character on.
instr2()
instr2(1;"ráce result";"a") - returns 2
SplitString()
SplitString takes 3 parameters - a string, a delimiter and a number n.
The string is split at each occurrence of the delimiter, then the nth object is returned, for example:
SplitString("a,b,c,d"; ","; 3) returns c
val()
val([ATF1]) - can be used for numerical sorting by ATF1
val("3")<val("20") - returns 1 (true)
"3"<"20" - returns 0 (false due to text comparison)
len()
len("race result") - returns 11.
len([LastName]) - returns the length of the last name
lcase()
UCase([LastName]) & ", " & LCase([FirstName]) - returns for example DOE, john
ucase()
UCase([LastName]) & ", " & LCase([FirstName]) - returns for example DOE, john
trim()
trim(" Hello World ") - returns "Hello World"string()
string(3; "Run! ") - return "Run! Run! Run! ".
replace()
replace("race result"; " "; "-") - returns "race-result".reduceChars()
reduceChars has two strings a and b as parameters and returns only those characters of a that are part of b:
reduceChars("race result 12 software 2020"; "0123456789") - returns 122020
removeAccents()
removeAccents("Café au Lait") - returns "Cafe au Lait"chr()
chr(65) - returns "A"
asc()
asc("A") - returns 65.ordinal()
ordinal(1) - returns "1st"
ordinal(3) - returns "3rd"
ordinal(15) - returns "15th"
similarity()
The function similarity returns the similarity of two strings as a value between 0 and 1.
similarity("Hansaplast";"HansPlasta") - returns 0.625
similarity([LastName];[LastName]) - returns 1
CorrectSpelling()
The function CorrectSpelling converts the characters of the first/last name to upper and lower case as expected: the first character will be in upper case, all other characters in lower case. The words "de", "der", "und", "van", "von" and "zu" always will be in lower case.
CorrectSpelling("max VON uNd zu mustERMann") - returns Max von und zu Mustermann
stringCount()
stringCount takes two strings a and b. It returns how often b appears in a
stringCount("race result 12"; "r") - returns 2