4.2.9 Finding a character in a string
The inString
command tests to see if a string contains a
character.
-
inString takes two arguments:
-
str, a string.
- c, a character.
- inString(str,c) returns
the index of its first occurrence of the character c in the string
str, or -1 if c does not occur in str.
Examples