Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 301 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 301 Bytes

Exercise 2-5

Write the function any(s1, s2), which returns the first location in the string s1 where any character from the string s2 occurs, or -1 if s1 contains no characters from s2.

(The standard library function strpbrk does the same job but returns a pointer to the location.)