Multiple choice technology web technology

The function of strcspn is

  1. Returns the first position in a string that contains a character not in another string

  2. Matches one string in another using glob style matching

  3. Returns the position of the character that's lowest in the ASCII set in a given string

  4. None of the Above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

strcspn() returns the length of the initial segment of the first string that does NOT contain any characters from the second string - effectively finding the first position with a character not in the other string. It does not perform glob matching or find ASCII minimum positions.