Skip to content

Commit 4292a8b

Browse files
consistent code unit variable names
1 parent cde0d26 commit 4292a8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/String/CodePoints.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ toCodePointArrayFallback :: String -> Array CodePoint
210210
toCodePointArrayFallback s = unfoldr decode (fromFoldable (Char.toCharCode <$> String.toCharArray s))
211211
where
212212
decode :: List Int -> Maybe (Tuple CodePoint (List Int))
213-
decode (Cons h (Cons l rest)) | isLead h && isTrail l
214-
= Just (Tuple (unsurrogate h l) rest)
215-
decode (Cons c rest) = Just (Tuple (CodePoint c) rest)
213+
decode (Cons cu0 (Cons cu1 rest)) | isLead cu0 && isTrail cu1
214+
= Just (Tuple (unsurrogate cu0 cu1) rest)
215+
decode (Cons cu rest) = Just (Tuple (CodePoint cu) rest)
216216
decode Nil = Nothing
217217

218218

0 commit comments

Comments
 (0)