File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2
2
"private" : true ,
3
3
"scripts" : {
4
4
"clean" : " rimraf output && rimraf .pulp-cache" ,
5
- "build" : " jshint src && jscs src && psa \" src/**/*.purs \" \" bower_components/purescript-*/src/**/*.purs \" --censor-lib --strict" ,
6
- "test" : " psc \" src/**/*.purs \" \" bower_components/purescript-*/src/**/*.purs \" \" test/**/*.purs \" && psc-bundle \" output/**/*.js \" --module Test.Main --main Test.Main | node "
5
+ "build" : " jshint src && jscs src && pulp build --censor-lib --strict" ,
6
+ "test" : " pulp test"
7
7
},
8
8
"devDependencies" : {
9
9
"jscs" : " ^2.8.0" ,
10
10
"jshint" : " ^2.9.1" ,
11
- "pulp" : " ^8.2.0 " ,
12
- "purescript-psa" : " ^0.3.8 " ,
11
+ "pulp" : " ^9.0.1 " ,
12
+ "purescript-psa" : " ^0.3.9 " ,
13
13
"rimraf" : " ^2.5.0"
14
14
}
15
15
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ module Data.String
23
23
, dropWhile
24
24
, stripPrefix
25
25
, stripSuffix
26
+ , count
26
27
, split
27
28
, toCharArray
28
29
, toLower
Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ testString = do
142
142
assert $ drop 3 " ab" == " "
143
143
assert $ drop (-1 ) " ab" == " ab"
144
144
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
+
145
151
log " split"
146
152
assert $ split " " " " == []
147
153
assert $ split " " " a" == [" a" ]
@@ -167,4 +173,3 @@ testString = do
167
173
assert $ joinWith " " [] == " "
168
174
assert $ joinWith " " [" a" , " b" ] == " ab"
169
175
assert $ joinWith " --" [" a" , " b" , " c" ] == " a--b--c"
170
-
You can’t perform that action at this time.
0 commit comments