I want to find indices
for more than one letter in a word. I don't want to use Regex
es, because they will slow down the program (which is already slower than I wanted).
> "banana".indices(("a", "b").any)
any((1 3 5), (0))
How can I instead get 0, 1, 3, 5
?
I would go for something like this (in the REPL):
> gather "banana".indices("a"|"b").deepmap: *.take
(1 3 5 0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With