Call extension method instead '.Contains()'

This commit is contained in:
ivandroflygit config --global user.email ivandrofly@gmail.comgit config --global user.name ivandrofly 2015-12-18 17:45:09 +00:00
parent 16e78d063c
commit 51ab47541b

View File

@ -486,14 +486,7 @@ namespace Nikse.SubtitleEdit.Core.Dictionaries
if (StartEndEndsWithNumber.IsMatch(word))
return word;
if (word.Contains('2') ||
word.Contains('3') ||
word.Contains('4') ||
word.Contains('5') ||
word.Contains('6') ||
word.Contains('7') ||
word.Contains('8') ||
word.Contains('9'))
if (word.Contains(new[] { '2', '3', '4', '5', '6', '7', '8', '9' }))
return word;
if (HexNumber.IsMatch(word))
@ -529,15 +522,7 @@ namespace Nikse.SubtitleEdit.Core.Dictionaries
if (StartEndEndsWithNumber.IsMatch(word))
return word;
if (word.Contains('1') ||
word.Contains('2') ||
word.Contains('3') ||
word.Contains('4') ||
word.Contains('5') ||
word.Contains('6') ||
word.Contains('7') ||
word.Contains('8') ||
word.Contains('9') ||
if (word.Contains(new[] { '1', '2', '3', '4', '5', '6', '7', '8', '9' }) ||
word.EndsWith("a.m", StringComparison.Ordinal) ||
word.EndsWith("p.m", StringComparison.Ordinal) ||
word.EndsWith("am", StringComparison.Ordinal) ||