Merge pull request #2372 from ivandrofly/utilities1

[utilities] - call optimized method to reverse parenthesis.
This commit is contained in:
Nikolaj Olsson 2017-05-06 08:37:16 +02:00 committed by GitHub
commit f9cb2450c8

View File

@ -1261,15 +1261,7 @@ namespace Nikse.SubtitleEdit.Core
var lines = text.SplitToLines();
foreach (string line in lines)
{
string s = line.Trim();
for (int i = 0; i < s.Length; i++)
{
if (s[i] == ')')
s = s.Remove(i, 1).Insert(i, "(");
else if (s[i] == '(')
s = s.Remove(i, 1).Insert(i, ")");
}
string s = ReverseParenthesis(line.Trim());
bool numbersOn = false;
string numbers = string.Empty;
for (int i = 0; i < s.Length; i++)