I know I can loop over the string or build a regex or invert the set (ASCII isn't that big after all) and search for the first instance of that, but Yuck.
What I'm looking for is a nice one liner.
fewer features is better, LINQ is out (for me, don't ask, it's a long story)
The solution I'm going with (unless I see something better)
static int FirstNotMeta(int i, string str)
{
for(; i < str.Length; i++)
switch(str[i])
{
case '\\':
case '/':
case '.':
continue;
default:
return i;
}
return -1;
}
OK, I cheated, I know in advance what char's I care about.