mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 06:22:38 +01:00
Refactor (minor)
This commit is contained in:
parent
92a427c4d5
commit
19ff3b46dd
@ -98,7 +98,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
private TimeCode DecodeTime(string s)
|
||||
{
|
||||
return DecodeTimeCodeFramesFourParts(s.Split(new char[] { ':' }));
|
||||
return DecodeTimeCodeFramesFourParts(s.Split(':'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -161,6 +161,10 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
sb.Append(Encoding.UTF8.GetString(buffer, textBegin, textIndex - textBegin - 1));
|
||||
}
|
||||
p.Text = sb.ToString().Trim();
|
||||
if (p.Text.Length > 1 && p.Text[0] == 31 || p.Text[1] == 65279)
|
||||
{
|
||||
p.Text = p.Text.Remove(0, 2);
|
||||
}
|
||||
for (int k = 0; k < p.Text.Length; k++)
|
||||
{
|
||||
if (p.Text[k] == 65533)
|
||||
|
@ -263,10 +263,10 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
break;
|
||||
}
|
||||
}
|
||||
var parts = localSb.ToString().Split(new char[] { ':', '.' });
|
||||
var parts = localSb.ToString().Split(new [] { ':', '.' });
|
||||
if (parts != null && parts.Length == 3)
|
||||
{
|
||||
parts = ("00:" + localSb.ToString()).Split(new char[] { ':', '.' });
|
||||
parts = ("00:" + localSb).Split(new [] { ':', '.' });
|
||||
}
|
||||
if (parts != null && parts.Length == 4)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user