Function group | Execute on client | Platform(s) |
---|---|---|
String | NO | All |
asc(string,position)
Returns the ASCII or Unicode value of the character at the position in the string. The first position in the string is 1.
The value returned for ASCII characters is between 0 and 255, or -1 if position is less than 1 or greater than the length of string.
Calculate lResult as asc('Quantity',1)
# returns 81, that is the ASCII value of the 1st character Q
Calculate lResult as asc('Car',3)
# returns 114, that is the ASCII value of the 3rd character r
Calculate lResult as asc('Train',9)
# returns -1 because 9 is greater than the length of the string