private static bool CompareChars(string value, char[] content, int pos) { if (pos + value.Length >= content.Length) return false; int i = 0; foreach (char c in value) { if (c != Char.ToUpper(content[pos + i], CultureInfo.InvariantCulture)) return false; i++; } return true; }