I need to detect surrogate pairs in hundreds of thousands of strings of various lengths.
I wonder what might be the fastest and most efficient way to do this.
string srcString = " = ";
var hasSurrogate = srcString.Any(c => '\uD800' <= c && c <= '\uDFFF');
Any works fine with its O(n) speed, but maybe there is a more efficient way to do this