Get indexes of character in array

James Miller james at aatch.net
Tue Mar 27 23:44:48 PDT 2012


On 28 March 2012 19:35, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> I'd like to get a list of indexes into an array that matches a character. E.g.:
>
> "a foo a bar a".indexes("a") == [0, 6, 12]
>
> Anything like that in Phobos?

std.regex might be able to produce something like it.

--
James Miller


More information about the Digitalmars-d-learn mailing list