File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ module Data.String
2323 , dropWhile
2424 , stripPrefix
2525 , stripSuffix
26+ , count
2627 , split
2728 , toCharArray
2829 , toLower
Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ testString = do
142142 assert $ drop 3 " ab" == " "
143143 assert $ drop (-1 ) " ab" == " ab"
144144
145+ log " count"
146+ assert $ count (_ == ' a' ) " " == 0
147+ assert $ count (_ == ' a' ) " ab" == 1
148+ assert $ count (_ == ' a' ) " aaab" == 3
149+ assert $ count (_ == ' a' ) " abaa" == 1
150+
145151 log " split"
146152 assert $ split " " " " == []
147153 assert $ split " " " a" == [" a" ]
@@ -167,4 +173,3 @@ testString = do
167173 assert $ joinWith " " [] == " "
168174 assert $ joinWith " " [" a" , " b" ] == " ab"
169175 assert $ joinWith " --" [" a" , " b" , " c" ] == " a--b--c"
170-
You can’t perform that action at this time.
0 commit comments