public bool FindAny(char[] chars) { if (pos >= end) return false; // Find it int index = str.IndexOfAny(chars, pos); if (index < 0 || index>=end) return false; // Store new position pos = index; return true; }