From 51ab47541b61c2c709a4b8e58af4249d4b9f8255 Mon Sep 17 00:00:00 2001 From: "ivandroflygit config --global user.email ivandrofly@gmail.comgit config --global user.name ivandrofly" Date: Fri, 18 Dec 2015 17:45:09 +0000 Subject: [PATCH] Call extension method instead '.Contains()' --- libse/Dictionaries/OcrFixReplaceList.cs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/libse/Dictionaries/OcrFixReplaceList.cs b/libse/Dictionaries/OcrFixReplaceList.cs index 801d3f872..8cb6b4a87 100644 --- a/libse/Dictionaries/OcrFixReplaceList.cs +++ b/libse/Dictionaries/OcrFixReplaceList.cs @@ -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) ||