internal static bool StrEqual(char[] chars, int strPos1, int strLen1, string str2) { if (strLen1 != str2.Length) { return false; } int i = 0; while (i < strLen1 && chars[strPos1 + i] == str2[i]) { i++; } return i == strLen1; }