public int IndexOf(string str, int idx, params char[] delims)
{
List<int> indices = new List<int>(delims.Length);
foreach (char d in delims)
{
int next = str.IndexOf(d, idx);
if (next >= 0)
indices.Add(next);
}
return (indices.Count > 0) ? indices.Min() : -1;
}