From 414b9c9c36c8b1576d3e974b6bba359f0005fdfc Mon Sep 17 00:00:00 2001 From: erykciepiela Date: Wed, 3 Sep 2025 09:05:44 +0000 Subject: [PATCH 1/3] CodeUnits length function doc references itself and is wrong --- src/Data/String/CodePoints.purs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Data/String/CodePoints.purs b/src/Data/String/CodePoints.purs index 610e497..4ac82c1 100644 --- a/src/Data/String/CodePoints.purs +++ b/src/Data/String/CodePoints.purs @@ -207,9 +207,6 @@ uncons s = case CU.length s of -- | ```purescript -- | >>> length "b 𝐀𝐀 c 𝐀" -- | 8 --- | -- compare to Data.String: --- | >>> length "b 𝐀𝐀 c 𝐀" --- | 11 -- | ``` -- | length :: String -> Int From 59f36927df785e877c44b54b39f67b82b84cb1a6 Mon Sep 17 00:00:00 2001 From: erykciepiela Date: Fri, 5 Sep 2025 07:05:23 +0000 Subject: [PATCH 2/3] reference do Data.String.CodeUnits.length --- src/Data/String/CodePoints.purs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Data/String/CodePoints.purs b/src/Data/String/CodePoints.purs index 4ac82c1..b695364 100644 --- a/src/Data/String/CodePoints.purs +++ b/src/Data/String/CodePoints.purs @@ -207,6 +207,9 @@ uncons s = case CU.length s of -- | ```purescript -- | >>> length "b 𝐀𝐀 c 𝐀" -- | 8 +-- | -- compare to Data.String.CodeUnits: +-- | >>> length "b 𝐀𝐀 c 𝐀" +-- | 11 -- | ``` -- | length :: String -> Int From 03b759e8c155e196a383558ec3f0e1945bdf5eaf Mon Sep 17 00:00:00 2001 From: erykciepiela Date: Fri, 5 Sep 2025 07:08:29 +0000 Subject: [PATCH 3/3] referencing Data.String.CodePoints.kength from Data.String.CodeUnits.length --- src/Data/String/CodeUnits.purs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Data/String/CodeUnits.purs b/src/Data/String/CodeUnits.purs index 5fed21f..ac78266 100644 --- a/src/Data/String/CodeUnits.purs +++ b/src/Data/String/CodeUnits.purs @@ -145,6 +145,10 @@ uncons s = Just { head: U.charAt zero s, tail: drop one s } -- | -- | ```purescript -- | length "Hello World" == 11 +-- | +-- | length "𝐀A" == 3 +-- | -- compare to Data.String.CodePoints: +-- | length "𝐀A" == 2 -- | ``` -- | foreign import length :: String -> Int