elemIndex package:foldl

(elemIndex a) returns the index of the first element that equals a, or Nothing if no element matches
(elemIndex w8) returns the index of the first byte that equals w8, or Nothing if no byte matches
(elemIndex c) returns the index of the first character that equals c, or Nothing if no character matches