Catmandu::Fix::index(3pm)

Catmandu::Fix::index3pm

Find all positions of a (sub)string in a field

Usage

   # On strings, search the occurence of a character in a string
   # word => "abcde"
   index(word,'c')                   # word => 2
   index(word,'x')                   # word => -1
   # word => "abccde"
   index(word,'c', multiple:1)       # word => [2,3]
   # word => [a,b,bba] , loop over all word(s) with the '*'
   index(word.*,'a')                 # word -> [0,-1,2]
   # On arrays, search the occurence of a word in an array
   # words => ["foo","bar","foo"]
   index(words,'bar')                # words => 1
   index(words,'foo', multiple: 1)   # words => [0,2]

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

From libcatmandu-perl 1.2024-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.