mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 04:02:36 +01:00
Merge pull request #2372 from ivandrofly/utilities1
[utilities] - call optimized method to reverse parenthesis.
This commit is contained in:
commit
f9cb2450c8
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user