private static bool MatchEraName(ref __DTString str, DateTimeFormatInfo dtfi, ref int result) {
if (str.GetNext()) {
int[] eras = dtfi.Calendar.Eras;
if (eras != null) {
for (int i = 0; i < eras.Length; i++) {
String searchStr = dtfi.GetEraName(eras[i]);
if (str.MatchSpecifiedWord(searchStr)) {
str.Index += (searchStr.Length - 1);
result = eras[i];
return (true);
}
searchStr = dtfi.GetAbbreviatedEraName(eras[i]);
if (str.MatchSpecifiedWord(searchStr)) {
str.Index += (searchStr.Length - 1);
result = eras[i];
return (true);
}
}
}
}
return false;
}