adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Incorrect description in "substitute" #163

Closed Eswcvlad closed 4 months ago

Eswcvlad commented 4 months ago

This line

If which < 1, return text unchanged

is not longer correct with the index being 0-based.

Also these examples weren't updated. I think you've updated them in docSamples, but in the docstring the examples are old:

substitute("Quarter 1, 2008", "1", "2", 1) // returns "Quarter 2, 2008" substitute("Quarter 1, 1008", "1", "2", 2) // returns "Quarter 1, 2008"