Skip to content

Commit

Permalink
Pick the longest string that does not end with trailing zeroes
Browse files Browse the repository at this point in the history
  • Loading branch information
jessealama committed Oct 8, 2024
1 parent 5ef2e04 commit 174f778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ location: https://github.com/tc39/proposal-decimal/
1. If the final code unit of _digits_ is not the code unit 0x0030 (DIGIT ZERO), return _digits_.
1. Let _lhs_ be the substring of _digits_ up to the first occurrence of the string *"."*.
1. Let _rhs_ be the substring of _digits_ starting at the first code point after the first occurrence of the string *"."*.
1. Let _noTrailingZeroes_ be the shortest substring of _rhs_ that does not terminate with a sequence of the code point 0x0030 (DIGIT ZERO).
1. Let _noTrailingZeroes_ be the longest substring of _rhs_ that does not terminate with a sequence of the code point 0x0030 (DIGIT ZERO).
1. If _noTrailingZeroes_ is *""*, return _lhs_.
1. Otherwise, return the concatenation of _lhs_, *"."*, and _noTrailingZeroes_.
</emu-alg>
Expand Down

0 comments on commit 174f778

Please sign in to comment.