JanetDocsI'm feeling luckyGithub sign in

string/find-all



    cfunction

    (string/find-all patt str)
    
    Searches for all instances of pattern patt in string str. Returns an
    array of all indices of found patterns. Overlapping instances of the
    pattern are not counted, meaning a byte in string will only contribute
    to finding at most on occurrence of pattern. If no occurrences are
    found, will return an empty array.


1 exampleSign in to add an example
Loading...
(string/find-all "duck" "duck duck duck goose!") # => @[0 5 10]
sogaiu