startsWith using an array of needles

Byron byron.heads at gmail.com
Tue Aug 20 08:58:19 PDT 2013


I am trying to use startsWith with an array of needles.  Failes 
with not being able to match any functions.  Not sure if there is 
a work around.

const auto ignore = [".git/", ".gitignore"];

foreach(DirEntry e; getcwd.dirEntries(SpanMode.depth).filter!(a 
=> !a.name.startsWith(ignore))) {
		writeln(e.name);
	}


-Byron


More information about the Digitalmars-d-learn mailing list