- in - STR - search for indexes of this string
- in - CHR - character to search for
- in - STARTAT - (optional) index to start from, default is 0.
- Note that with startat > 0, output indexes will not be different than 0 start. Decrement startat from results gives offset from startat.
- in - FROMRIGHT? - (optional) if true, STARTAT and indexes are counted from end of string towards the beginning. The 0th character is at string-length - 1.
- returns: list of indexes per input criteria or null list if none found.
(import nutils)
(define str "abc dws qthcd po9inmhy ecvhn")
(str-ndx-ls str #\c) (str-ndx-ls str #\c 0 #t) (str-ndx-ls str #\c 5 #t) (foreach* ((n '(16 25))) (- n 5))