Fix string multiplication by 0 (and less than 1) to emit empty string

This commit is contained in:
itchyny authored and Nico Williams committed 2023-07-08 22:25:22 -05:00
1 parent 88b45771bd
commit cac3ea3726
2 files changed
+10 -4

No files matched your search

+5 -1
View File
@@ -1286,7 +1286,11 @@ indices(", ")
[.[] * "abc"]
[-1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 3.7, 10.0]
[null,null,null,"abc","abc","abc","abcabcabc","abcabcabcabcabcabcabcabcabcabc"]
[null,null,"","","abc","abc","abcabcabc","abcabcabcabcabcabcabcabcabcabc"]
[. * (nan,-nan)]
"abc"
[null,null]
[.[] / ","]
["a, bc, def, ghij, jklmn, a,b, c,d, e,f", "a,b,c,d, e,f,g,h"]