mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
[internal] - cache char array global
This commit is contained in:
parent
3366abdb44
commit
0e698216c1
@ -177,6 +177,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly char[] ExpectedCharsArray = { '.', '!', '?', ':', ';', ')', ']', '}', '(', '[', '{' };
|
||||
public void FixCasing(List<string> namesEtc, bool changeNameCases, bool makeUppercaseAfterBreak, bool checkLastLine, string lastLine)
|
||||
{
|
||||
var replaceIds = new List<string>();
|
||||
@ -212,7 +213,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
}
|
||||
}
|
||||
|
||||
if (makeUppercaseAfterBreak && StrippedText.Contains(new[] { '.', '!', '?', ':', ';', ')', ']', '}', '(', '[', '{' }))
|
||||
if (makeUppercaseAfterBreak && StrippedText.Contains(ExpectedCharsArray))
|
||||
{
|
||||
const string breakAfterChars = @".!?:;)]}([{";
|
||||
const string ExpectedChars = "\"`´'()<>!?.- \r\n";
|
||||
|
Loading…
Reference in New Issue
Block a user