Skip to content

Commit e0b2f00

Browse files
committed
Deprecate count, resolves #46
Removes the export for the function `count`.
1 parent 6e67dd1 commit e0b2f00

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

docs/Data/String.md

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

195195
Returns the string without the first `n` characters.
196196

197-
#### `count`
198-
199-
``` purescript
200-
count :: (Char -> Boolean) -> String -> Int
201-
```
202-
203-
Returns the number of contiguous characters at the beginning
204-
of the string for which the predicate holds.
205-
206197
#### `split`
207198

208199
``` purescript

docs/Data/String/Regex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Wraps Javascript `RegExp` objects.
1414

1515
##### Instances
1616
``` purescript
17-
instance showRegex :: Show Regex
17+
Show Regex
1818
```
1919

2020
#### `RegexFlags`

src/Data/String.purs

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

test/Test/Data/String.purs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,6 @@ testString = do
138138
assert $ drop 2 "ab" == ""
139139
assert $ drop 3 "ab" == ""
140140

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

0 commit comments

Comments
 (0)