drop -package:base package:bytestring

O(1) drop n xs returns the suffix of xs after the first n elements, or empty if n > length xs.
O(n/c) drop n xs returns the suffix of xs after the first n elements, or empty if n > length xs.
O(n) drop n xs returns the suffix of xs after the first n elements, or empty if n > length xs. Note: copies the entire byte array
O(1) dropEnd n xs is equivalent to take (length xs - n) xs. Drops n elements from end of bytestring.
>>> dropEnd 3 "abcdefg"
"abcd"

>>> dropEnd 0 "abcdefg"
"abcdefg"

>>> dropEnd 4 "abc"
""
Similar to dropWhile, drops the longest (possibly empty) prefix of elements satisfying the predicate and returns the remainder.
Similar to dropWhileEnd, drops the longest (possibly empty) suffix of elements satisfying the predicate and returns the remainder. dropWhileEnd p is equivalent to reverse . dropWhile p . reverse.
dropSpace efficiently returns the ByteString argument with white space Chars removed from the front. It is more efficient than calling dropWhile for removing whitespace. I.e.
dropWhile isSpace == dropSpace
dropWhile p xs returns the suffix remaining after takeWhile p xs.
dropWhileEnd p xs returns the prefix remaining after takeWhileEnd p xs.
O(n) dropEnd n xs is equivalent to take (length xs - n) xs. Drops n elements from end of bytestring.
>>> dropEnd 3 "abcdefg"
"abcd"

>>> dropEnd 0 "abcdefg"
"abcdefg"

>>> dropEnd 4 "abc"
""
Similar to dropWhileEnd, drops the longest (possibly empty) suffix of elements satisfying the predicate and returns the remainder. dropWhileEnd p is equivalent to reverse . dropWhile p . reverse.
>>> {-# LANGUAGE OverloadedLists #-)

>>> dropWhileEnd even [1,2,3,4,6]
[1,2,3]
Similar to dropWhileEnd, drops the longest (possibly empty) suffix of elements satisfying the predicate and returns the remainder. dropWhileEnd p is equivalent to reverse . dropWhile p . reverse.
O(n) dropEnd n xs is equivalent to take (length xs - n) xs. Drops n elements from end of bytestring.
>>> dropEnd 3 "abcdefg"
"abcd"

>>> dropEnd 0 "abcdefg"
"abcdefg"

>>> dropEnd 4 "abc"
""
Similar to dropWhile, drops the longest (possibly empty) prefix of elements satisfying the predicate and returns the remainder. Note: copies the entire byte array
Similar to dropWhileEnd, drops the longest (possibly empty) suffix of elements satisfying the predicate and returns the remainder. dropWhileEnd p is equivalent to reverse . dropWhile p . reverse.
A variety of drop which omits the checks on n so there is an obligation on the programmer to provide a proof that 0 <= n <= length xs.