Add doc comment for toScalars

This commit is contained in:
Richard Feldman 2022-07-01 23:19:32 -04:00
parent 348ca970d6
commit 40d90c9fb3
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798

View file

@ -173,6 +173,11 @@ countGraphemes : Str -> Nat
## single [U32]. You'd need to use `Str.startsWithCodePt "🕊"` instead. ## single [U32]. You'd need to use `Str.startsWithCodePt "🕊"` instead.
startsWithCodePt : Str, U32 -> Bool startsWithCodePt : Str, U32 -> Bool
## Return a [List] of the [unicode scalar values](https://unicode.org/glossary/#unicode_scalar_value)
## in the given string.
##
## (Strings contain only scalar values, not [surrogate code points](https://unicode.org/glossary/#surrogate_code_point),
## so this is equivalent to returning a list of the string's [code points](https://unicode.org/glossary/#code_point).)
toScalars : Str -> List U32 toScalars : Str -> List U32
## Return a [List] of the string's [U8] UTF-8 [code units](https://unicode.org/glossary/#code_unit). ## Return a [List] of the string's [U8] UTF-8 [code units](https://unicode.org/glossary/#code_unit).