split

split :: (Char -> Bool) -> Text -> [Text]
text Data.Text
O(n) Splits a Text into components delimited by separators, The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg. > split (=='a') "aabbaca" == ["","","bb","c",""] > split (=='a') "" == [""]
split :: (Char -> Bool) -> Text -> [Text]
text Data.Text.Lazy
O(n) Splits a Text into components delimited by separators, The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg. > split (=='a') "aabbaca" == ["","","bb","c",""] > split (=='a') [] == [""]
split :: Char -> ByteString -> [ByteString]
bytestring Data.ByteString.Char8
O(n) Break a ByteString into pieces separated by the byte argument, consuming the delimiter. I.e. > split '\n' "a\nb\nd\ne" == ["a","b","d","e"] > split 'a' "aXaXaXa" == ["","X","X","X",""] > split 'x' "x" == ["",""] and > intercalate [c] . split c == id > split == splitWith . (==) As for all splitting functions in this library, this function does not copy the substrings, it just constructs new ByteStrings that are slices of the original.
split :: Char -> ByteString -> [ByteString]
bytestring Data.ByteString.Lazy.Char8
O(n) Break a ByteString into pieces separated by the byte argument, consuming the delimiter. I.e. > split '\n' "a\nb\nd\ne" == ["a","b","d","e"] > split 'a' "aXaXaXa" == ["","X","X","X"] > split 'x' "x" == ["",""] and > intercalate [c] . split c == id > split == splitWith . (==) As for all splitting functions in this library, this function does not copy the substrings, it just constructs new ByteStrings that are slices of the original.
split :: Key -> IntMap a -> (IntMap a, IntMap a)
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(min(n,W)). The expression (split k map) is a pair (map1,map2) than k and all keys in map2 larger than k. Any key equal to k is found in neither map1 nor map2. > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")]) > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a") > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty) > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty)
split :: Key -> IntSet -> (IntSet, IntSet)
containers Data.IntSet
O(min(n,W)). The expression (split x set) is a pair (set1,set2) of set less than x and set2 comprises the elements of set greater than x. > split 3 (fromList [1..5]) == (fromList [1,2], fromList [4,5])
split :: Type -> (Type, [Type])
template-haskell Language.Haskell.TH.Ppr
split :: Word8 -> ByteString -> [ByteString]
bytestring Data.ByteString, bytestring Data.ByteString.Lazy
O(n) Break a ByteString into pieces separated by the byte argument, consuming the delimiter. I.e. > split '\n' "a\nb\nd\ne" == ["a","b","d","e"] > split 'a' "aXaXaXa" == ["","X","X","X",""] > split 'x' "x" == ["",""] and > intercalate [c] . split c == id > split == splitWith . (==) As for all splitting functions in this library, this function does not copy the substrings, it just constructs new ByteStrings that are slices of the original.
split :: Ord a => a -> Set a -> (Set a, Set a)
containers Data.Set
O(log n). The expression (split x set) is a pair (set1,set2) of set less than x and set2 comprises the elements of set greater than x.
split :: Ord k => k -> Map k a -> (Map k a, Map k a)
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). The expression (split k map) is a pair (map1,map2) than k and the keys in map2 larger than k. Any key equal to k is found in neither map1 nor map2. > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")]) > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a") > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty) > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty)
split :: RandomGen g => g -> (g, g)
random System.Random
package split
package
A collection of various methods for splitting lists into parts, akin to the "split" function found in several mainstream languages. Here is its tale: Once upon a time the standard Data.List module held no function for splitting a list into parts according to a delimiter. Many a brave lambda-knight strove to add such a function, but their striving was in vain, for Lo, the Supreme Council fell to bickering amongst themselves what was to be the essential nature of the One True Function which could cleave a list in twain (or thrain, or any required number of parts). And thus came to pass the split package, comprising divers functions for splitting a list asunder, each according to its nature.  And the Supreme Council had no longer any grounds for argument, for the favored method of each was contained therein. To get started, see the Data.List.Split module. Version 0.2.2
splitAt :: Int -> [a] -> ([a], [a])
base Prelude, base Data.List
splitAt n xs returns a tuple xs prefix of length n and second element is the remainder of the list: > splitAt 6 "Hello World!" == ("Hello ","World!") > splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5]) > splitAt 1 [1,2,3] == ([1],[2,3]) > splitAt 3 [1,2,3] == ([1,2,3],[]) > splitAt 4 [1,2,3] == ([1,2,3],[]) > splitAt 0 [1,2,3] == ([],[1,2,3]) > splitAt (-1) [1,2,3] == ([],[1,2,3]) It is equivalent to (take n xs, drop n xs). splitAt is an instance of the more general Data.List.genericSplitAt, in which n may be of any integral type.
splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
base Data.Typeable
Splits a type constructor application
package split-channel
package
This module splits Control.Concurrent.Chan into sending and receiving halves, which allows the type system to more finely constrain program behavior.   As a secondary benefit,  messages written to channels with no receive ports associated with them can be reliably garbage collected. In addition, this module incorporates several of clean-ups and additions to the venerable Chan.  Most notably,  the deprecated thread-unsafe functions have been removed,  the ability to duplicate Receive Ports has been added,  the sendMany operation allows for multiple messages to be sent atomically,  and the split operation turns a single channel into two. Version 0.2.0.1
package split-record
package
Split a big audio file into pieces at positions of silence Version 0.1.1
splitAt :: Int -> ByteString -> (ByteString, ByteString)
bytestring Data.ByteString, bytestring Data.ByteString.Char8
O(1) splitAt n xs is equivalent to (take n xs, drop n xs).
splitAt :: Int -> Seq a -> (Seq a, Seq a)
containers Data.Sequence
O(log(min(i,n-i))). Split a sequence at a given position. splitAt i s = (take i s, drop i s).
splitAt :: Int -> Text -> (Text, Text)
text Data.Text
O(n) splitAt n t returns a pair whose first element is a prefix of t of length n, and whose second is the remainder of the string. It is equivalent to (take n t, drop n t).
splitAt :: Int64 -> ByteString -> (ByteString, ByteString)
bytestring Data.ByteString.Lazy, bytestring Data.ByteString.Lazy.Char8
O(n\c)/ splitAt n xs is equivalent to (take n xs, drop n xs).

Show more results