stedolan/jq — pull request #224 by nicowilliams (2013-11-29 19:06:32+00:00)
Title: Features: more arity, string ops

Documentation isn't there yet. Tests are.

Features added:

- more arity

- startswith, endswith, split, slice, implode, explode

- string slicing

- string subtraction, multiplication, division, and modulo

(remove suffix, concat N times, split on separator, and remove prefix)

I think the string subtraction and modulo might be strange, so if you'd like to I can rebase and remove those two.

Note: string slicing currently isn't efficient: it always allocates a new string -- there's no allocation sharing here yet.

Note: string slicing counts codepoints.