feat(sterni/nix/utf8): allow decoding the empty string
Change-Id: I8de9cd28c822ac5befbcd16e118440cd13cd86e9
This commit is contained in:
parent
8615322bc8
commit
ab92c42f59
2 changed files with 3 additions and 3 deletions
|
|
@ -201,10 +201,10 @@ let
|
|||
|
||||
# filter out all iteration steps without a codepoint value
|
||||
codepoint != null
|
||||
# if we are at the iteration step of the input string, throw
|
||||
# if we are at the iteration step of a non-empty input string, throw
|
||||
# an error if no codepoint was returned, as it indicates an incomplete
|
||||
# UTF-8 sequence.
|
||||
|| (stringIndex == stringLength - 1 && throw earlyEndMsg)
|
||||
|| (stringLength > 0 && stringIndex == stringLength - 1 && throw earlyEndMsg)
|
||||
|
||||
) iterResult
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue