Skip to content

Commit 5772cb6

Browse files
committed
Merge pull request #50 from sharkdp/deprecate-count
Deprecate count, resolves #46
2 parents 5898fb2 + e0b2f00 commit 5772cb6

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

docs/Data/String.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,6 @@ drop :: Int -> String -> String
186186

187187
Returns the string without the first `n` characters.
188188

189-
#### `count`
190-
191-
``` purescript
192-
count :: (Char -> Boolean) -> String -> Int
193-
```
194-
195-
Returns the number of contiguous characters at the beginning
196-
of the string for which the predicate holds.
197-
198189
#### `split`
199190

200191
``` purescript

src/Data/String.purs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module Data.String
1717
, singleton
1818
, localeCompare
1919
, replace
20-
, count
2120
, take
2221
, takeWhile
2322
, drop

test/Test/Data/String.purs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,6 @@ testString = do
137137
assert $ drop 3 "ab" == ""
138138
assert $ drop (-1) "ab" == "ab"
139139

140-
log "count"
141-
assert $ count (\c -> true) "" == 0
142-
assert $ count (\c -> true) "ab" == 2
143-
assert $ count (\c -> false) "ab" == 0
144-
assert $ count (\c -> c == 'a') "aabbcc" == 2
145-
assert $ count (\c -> c == 'b') "aabbcc" == 0
146-
assert $ count (\c -> c /= 'a') "aabbcc" == 0
147-
assert $ count (\c -> c /= 'b') "aabbcc" == 2
148-
149140
log "split"
150141
assert $ split "" "" == []
151142
assert $ split "" "a" == ["a"]

0 commit comments

Comments
 (0)