next up previous contents index
Next: Inputting strings interactively Up: Strings Previous: Substrings

Testing strings

The following string operators, discussed in greater detail in §21.11, may be used in equations:

empty$()
to test whether or not a string is empty.

eq$(,)
to test the equality of two strings.
len$()
to return the length of a string.

neq$(,)
to test the inequality of two strings.
real$()
to test whether a string represents in integer; a real number; or neither of these.

These string operators all return the value unity if the test is true, and zero otherwise, and all may be used in equations in the usual way.



David Wooff
Wed Oct 21 15:14:31 BST 1998