private static bool MatchesSection(ref TextPtr ptr, string section) { if (!ptr.StartsWith("[")) { return(false); } TextPtr ptr2 = ptr + 1; if (!ptr2.StartsWithCaseInsensitive(section)) { return(false); } ptr2 += section.Length; if (!ptr2.StartsWith("]")) { return(false); } return(true); }