01mf02 / jaq

A jq clone focussed on correctness, speed, and simplicity
MIT License
2.61k stars 63 forks source link

String splitting via division. #167

Closed 01mf02 closed 4 months ago

01mf02 commented 4 months ago

This PR makes it possible to split a string s by sep via s / sep. Previously, the same could be achieved by s | split(sep).

Furthermore, the behaviour of split now matches jq, which returns [] when s is "". Before, split would return [""].