On Monday, August 15, 2011 12:53 Andrej Mitrovic wrote: > This will print the count of whitespace chars in a line: > > writeln(count!isWhite(line)); > > What I need is the count of whitspace chars until the first > non-whitespace char is found, essentially I need a "countWhile" > template: > > writeln(countWhile!isWhite(line)); > > Can I do this with existing templates somehow?
writeln(count!(not!isWhite)(line)); - Jonathan M Davis
