Functions | |
| asc (char) | |
| Returns the decimal value of a char. | |
| chr (dec_no) | |
| Returns the character corresponding to a decimal value in ASCII table. | |
| lcase (astring) | |
| Convert to lower case. | |
| ucase (astring) | |
| Convert to upper case. | |
| pos (substring, string) | |
| Search a substring in a string. | |
| trim (string) | |
| Trims a string. | |
| mid (string, start, char_no) | |
| Return a part of a string. | |
| del (string, start, char_no) | |
| Delete a part of a string. | |
| len (string) | |
| Return length of a string. | |
| split (string, substring) | |
| Split a string. | |
| extract (token_no) | |
| Return a token resulted after a split. | |
| tohex (astring) | |
| Format a string in hexadecimal. | |
|
|
Returns the decimal value of a char. Returns the decimal value of the char.
writelog(asc("a")) prints in log "97" |
|
|
Returns the character corresponding to a decimal value in ASCII table. Returns the character corresponding to the decimal value no, which must be less then 256, in ASCII table
writelog(chr(97)) prints in log "a" |
|
||||||||||||||||
|
Delete a part of a string.
Delete a char_no number of characters starting at start from string.
mystring=del("my big string",1,3) writelog(mystring) prints in log "big string" |
|
|
Return a token resulted after a split. Returns token_no string resulted from splitting a string with split function.
s="a|s|c" l=split(s,"|") for (i,1,l,1) writelog(extract(i)) next |
|
|
Convert to lower case. Returns the string with all characters in lower case.
writelog(lcase ("My String")) prints in log "my string" |
|
|
Return length of a string. Returns the number of characters of the string.
writelog(len("my big string")) prints in log "13" |
|
||||||||||||||||
|
Return a part of a string. Returns the string's substring starting at start with a length of char_no.
midstring=mid("my big string",4,3) writelog(midstring) prints in log "big" |
|
||||||||||||
|
Search a substring in a string.
Returns the position of the first substring's character in the string.
position=pos("string","my string") writelog(position) prints in log "4" |
|
||||||||||||
|
Split a string.
Splits string in tokens delimited by substring.
|
|
|
Format a string in hexadecimal. Return a hexadecimal formatted string, each character followed by a space.
|
|
|
Trims a string. Returns string with all leading and ending spaces and control characters deleted.
trimedstring=trim(" my string "&chr(13)&chr(10)) #has spaces writelog (trimedstring) prints in log "my string", without spaces |
|
|
Convert to upper case. Returns the string with all characters in upper case.
writelog(ucase ("My String")) prints in log "MY STRING" |