mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
[Chk] - Use helper class to detect if char is digit [0-9].
This commit is contained in:
parent
954991ede7
commit
b4271692db
@ -46,6 +46,7 @@
|
|||||||
<Compile Include="BluRaySup\PaletteInfo.cs" />
|
<Compile Include="BluRaySup\PaletteInfo.cs" />
|
||||||
<Compile Include="BluRaySup\ToolBox.cs" />
|
<Compile Include="BluRaySup\ToolBox.cs" />
|
||||||
<Compile Include="BmpReader.cs" />
|
<Compile Include="BmpReader.cs" />
|
||||||
|
<Compile Include="CharUtils.cs" />
|
||||||
<Compile Include="Configuration.cs" />
|
<Compile Include="Configuration.cs" />
|
||||||
<Compile Include="ContainerFormats\AviRiffData.cs" />
|
<Compile Include="ContainerFormats\AviRiffData.cs" />
|
||||||
<Compile Include="ContainerFormats\Ebml\Element.cs" />
|
<Compile Include="ContainerFormats\Ebml\Element.cs" />
|
||||||
|
@ -143,7 +143,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
|||||||
if (end - start > 0)
|
if (end - start > 0)
|
||||||
text = _codePage.GetString(buffer, start, end - start);
|
text = _codePage.GetString(buffer, start, end - start);
|
||||||
}
|
}
|
||||||
if (text.Length > 4 && text[0] == 0x1f && text[1] == 'R' && text[4] == '.' && "0123456789".Contains(text[2]) && "0123456789".Contains(text[3]))
|
if (text.Length > 4 && text[0] == 0x1f && text[1] == 'R' && text[4] == '.' && CharUtils.IsDigit(text[2]) && CharUtils.IsDigit(text[3]))
|
||||||
{
|
{
|
||||||
text = text.Remove(0, 5);
|
text = text.Remove(0, 5);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user