The strlen instruction computes the length of a string.
Synopsis
strlen(ctype.src)
Description
The strlen instruction computes the length of the string specified by the type.src argument. The type.src argument can be a literal string or the location of a string. The length of the string (that is, number of characters in the string) is returned in register 0 (r.0).
Examples
In the following example, the length of the string is stored at location char.19. If the length of the string is less than 10 characters, the script jumps to the label Lab1.
strlen(char.19)
jmp(r.0 < 10,Lab1)
In the following example, the length of the literal string AB123,:=+ is computed (9 in this case) and stored in register 0. Since r.0 contains 9, the script does not jump to Lab2.
strlen("AB123,:=+")
jmp(r.0 !=9,Lab2)