Is there a means to get the index of the first non-whitespace character in a string (or more generally, the index of the first character matching a condition) in C# without
Yes you can try this:
string stg = " xyz"; int indx = (stg.Length - stg.Trim().Length);