From b6937821af74196b5794f63c73bcd1ea9b1e361b Mon Sep 17 00:00:00 2001 From: Emiel van de Laar Date: Wed, 2 Dec 2020 10:03:50 +0100 Subject: [PATCH] Remove references to `codePointToInt` The `codePointToInt` function is no longer available but is still referenced in a few documentation examples. Here we replace it with `fromEnum`. --- src/Data/String/CodePoints.purs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/String/CodePoints.purs b/src/Data/String/CodePoints.purs index 9083c10..82d263c 100644 --- a/src/Data/String/CodePoints.purs +++ b/src/Data/String/CodePoints.purs @@ -220,7 +220,7 @@ length = Array.length <<< toCodePointArray -- | time linear to the length of the string. -- | -- | ```purescript --- | >>> countPrefix (\c -> codePointToInt c == 0x1D400) "𝐀𝐀 b c 𝐀" +-- | >>> countPrefix (\c -> fromEnum c == 0x1D400) "𝐀𝐀 b c 𝐀" -- | 2 -- | ``` -- | @@ -329,7 +329,7 @@ takeFallback n s = case uncons s of -- | in time linear to the length of the string. -- | -- | ```purescript --- | >>> takeWhile (\c -> codePointToInt c == 0x1D400) "𝐀𝐀 b c 𝐀" +-- | >>> takeWhile (\c -> fromEnum c == 0x1D400) "𝐀𝐀 b c 𝐀" -- | "𝐀𝐀" -- | ``` -- | @@ -356,7 +356,7 @@ drop n s = CU.drop (CU.length (take n s)) s -- | to the length of the string. -- | -- | ```purescript --- | >>> dropWhile (\c -> codePointToInt c == 0x1D400) "𝐀𝐀 b c 𝐀" +-- | >>> dropWhile (\c -> fromEnum c == 0x1D400) "𝐀𝐀 b c 𝐀" -- | " b c 𝐀" -- | ``` -- |