Finding a character in a string: inString

### 6.3.10 Finding a character in a string: inString

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.

- Input:
  inString("abcded","d")
  Output:

  3

- Input:
  inString("abcd","e")
  Output:

  −1