Skip to content

Commit 03b03a7

Browse files
authored
CodeUnits length function doc references itself and is wrong (#177)
* CodeUnits length function doc references itself and is wrong * reference do Data.String.CodeUnits.length * referencing Data.String.CodePoints.kength from Data.String.CodeUnits.length
1 parent b6654d4 commit 03b03a7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Data/String/CodePoints.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ uncons s = case CU.length s of
207207
-- | ```purescript
208208
-- | >>> length "b 𝐀𝐀 c 𝐀"
209209
-- | 8
210-
-- | -- compare to Data.String:
210+
-- | -- compare to Data.String.CodeUnits:
211211
-- | >>> length "b 𝐀𝐀 c 𝐀"
212212
-- | 11
213213
-- | ```

src/Data/String/CodeUnits.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ uncons s = Just { head: U.charAt zero s, tail: drop one s }
145145
-- |
146146
-- | ```purescript
147147
-- | length "Hello World" == 11
148+
-- |
149+
-- | length "𝐀A" == 3
150+
-- | -- compare to Data.String.CodePoints:
151+
-- | length "𝐀A" == 2
148152
-- | ```
149153
-- |
150154
foreign import length :: String -> Int

0 commit comments

Comments
 (0)