Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# startswith/1 is boolean:
"abc" | startswith("ab")
#=> true

View file

@ -0,0 +1,6 @@
# index/1 returns the index or null,
# so the jq test "if index(_) then ...." can be used
# without any type conversion.
"abcd" | index( "bc")
#=> 1

View file

@ -0,0 +1,3 @@
# endswith/1 is also boolean:
"abc" | endswith("bc")
#=> true

View file

@ -0,0 +1,5 @@
"abc" | test( "^ab")
"abcd" | test("bc")
"abcd" | test("cd$")

View file

@ -0,0 +1,6 @@
# In jq 1.4 or later:
jq -n '"abcdabcd" | indices("bc")'
[
1,
5
]

View file

@ -0,0 +1,3 @@
$ jq -n '"abcdabcd" | match("bc"; "g") | .offset'
1
5