oneOf package:vector-split

A splitting strategy that splits on any one of the given elements. For example: >>> split (oneOf (BV.fromList "xyz")) (BV.fromList "aazbxyzcxd") ["aa","z","b","x","","y","","z","c","x","d"]
Split into chunks terminated by one of the given elements. Equivalent to split . dropFinalBlank . dropDelims . oneOf. For example:
>>> endByOneOf (BV.fromList ";,") (BV.fromList "foo;bar,baz;")
["foo","bar","baz"]
Make a strategy that splits a list into chunks that all end with one of the given elements, except possibly the last. Equivalent to dropFinalBlank . keepDelimsR . oneOf. For example:
>>> split (condense . endsWithOneOf (BV.fromList ".,?! ")) (BV.fromList "Hi, there!  How are you?")
["Hi, ","there!  ","How ","are ","you?"]
Split on any of the given elements. Equivalent to split . dropDelims . oneOf. For example:
>>> splitOneOf (BV.fromList ";.,") (BV.fromList "foo,bar;baz.glurk")
["foo","bar","baz","glurk"]
Make a strategy that splits a list into chunks that all start with one of the given elements (except possibly the first). Equivalent to dropInitBlank . keepDelimsL . oneOf. For example:
>>> split (startsWithOneOf (BV.fromList ['A'..'Z'])) (BV.fromList "ACamelCaseIdentifier")
["A","Camel","Case","Identifier"]