elemIndex -package:utf8-string package:bytestring

O(n) The elemIndex function returns the index of the first element in the given ByteString which is equal to the query element, or Nothing if there is no such element. This implementation uses memchr(3).
O(n) The elemIndex function returns the index of the first element in the given ByteString which is equal (by memchr) to the query element, or Nothing if there is no such element.
O(n) The elemIndex function returns the index of the first element in the given ByteString which is equal to the query element, or Nothing if there is no such element. This implementation uses memchr(3).
O(n) The elemIndex function returns the index of the first element in the given ByteString which is equal (by memchr) to the query element, or Nothing if there is no such element.
O(n) The elemIndex function returns the index of the first element in the given ShortByteString which is equal to the query element, or Nothing if there is no such element.
O(n) The elemIndexEnd function returns the last index of the element in the given ByteString which is equal to the query element, or Nothing if there is no such element. The following holds:
elemIndexEnd c xs = case elemIndex c (reverse xs) of
Nothing -> Nothing
Just i  -> Just (length xs - 1 - i)
O(n) The elemIndexEnd function returns the last index of the element in the given ByteString which is equal to the query element, or Nothing if there is no such element. The following holds:
elemIndexEnd c xs = case elemIndex c (reverse xs) of
Nothing -> Nothing
Just i  -> Just (length xs - 1 - i)
O(n) The elemIndexEnd function returns the last index of the element in the given ByteString which is equal to the query element, or Nothing if there is no such element. The following holds:
elemIndexEnd c xs = case elemIndex c (reverse xs) of
Nothing -> Nothing
Just i  -> Just (length xs - 1 - i)
O(n) The elemIndexEnd function returns the last index of the element in the given ByteString which is equal to the query element, or Nothing if there is no such element. The following holds:
elemIndexEnd c xs = case elemIndex c (reverse xs) of
Nothing -> Nothing
Just i  -> Just (length xs - 1 - i)