MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

Division by empty string yields array with empty strings at start and end #47

Closed itchyny closed 2 years ago

itchyny commented 2 years ago
❯ jq -c '. / ""' <<< '"abcde"'
["a","b","c","d","e"]

❯ xq -c '. / ""' <<< '"abcde"'
["","a","b","c","d","e",""]

❯ xq --version                
xq 0.1.9-b5d6c8d747459413aadf8298237f1628edbbd9e7
MiSawa commented 2 years ago

Thank you for reporting! TIL that the behavior of str::split is different from other languages.