mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix Str.fromUtf8 type annotation
This commit is contained in:
parent
e6808b3252
commit
2fd968e023
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ toUtf8 : Str -> List U8
|
|||
## expect Str.fromUtf8 [240, 159, 144, 166] == Ok "🐦"
|
||||
## expect Str.fromUtf8 [] == Ok ""
|
||||
## expect Str.fromUtf8 [255] |> Result.isErr
|
||||
fromUtf8 : List U8 -> Result Str [BadUtf8 Utf8ByteProblem Nat]*
|
||||
fromUtf8 : List U8 -> Result Str [BadUtf8 Utf8ByteProblem Nat]
|
||||
fromUtf8 = \bytes ->
|
||||
result = fromUtf8RangeLowlevel bytes 0 (List.len bytes)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue