find package:bytestring

O(n) The find function takes a predicate and a ByteString, and returns the first element in matching the predicate, or Nothing if there is no such element.
find f p = case findIndex f p of Just n -> Just (p ! n) ; _ -> Nothing
O(n) The find function takes a predicate and a ByteString, and returns the first element in matching the predicate, or Nothing if there is no such element.
O(n) The find function takes a predicate and a ShortByteString, and returns the first element in matching the predicate, or Nothing if there is no such element.
find f p = case findIndex f p of Just n -> Just (p ! n) ; _ -> Nothing
O(n) The findIndex function takes a predicate and a ByteString and returns the index of the first element in the ByteString satisfying the predicate.
O(n) The findIndexEnd function takes a predicate and a ByteString and returns the index of the last element in the ByteString satisfying the predicate.
O(n) The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.
The findIndex function takes a predicate and a ByteString and returns the index of the first element in the ByteString satisfying the predicate.
O(n) The findIndexEnd function takes a predicate and a ByteString and returns the index of the last element in the ByteString satisfying the predicate.
The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.
findIndexOrLength is a variant of findIndex, that returns the length of the string if no element is found, rather than Nothing.
The findIndex function takes a predicate and a ByteString and returns the index of the first element in the ByteString satisfying the predicate.
The findIndexEnd function takes a predicate and a ByteString and returns the index of the last element in the ByteString satisfying the predicate.
The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.
The findIndex function takes a predicate and a ByteString and returns the index of the first element in the ByteString satisfying the predicate.
The findIndexEnd function takes a predicate and a ByteString and returns the index of the last element in the ByteString satisfying the predicate.
The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.
O(n) The findIndex function takes a predicate and a ShortByteString and returns the index of the first element in the ShortByteString satisfying the predicate.
O(n) The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.