mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Added StringSplit exMethod
This commit is contained in:
parent
a9b9d7ce2f
commit
377cd50b1e
@ -35,6 +35,11 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
return source.IndexOf(value, comparisonType) >= 0;
|
return source.IndexOf(value, comparisonType) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string[] SplitToLines(this string source)
|
||||||
|
{
|
||||||
|
return source.Replace("\r\n", "\n").Replace("\r", "\n").Split('\n');
|
||||||
|
}
|
||||||
|
|
||||||
// http://www.codeproject.com/Articles/43726/Optimizing-string-operations-in-C
|
// http://www.codeproject.com/Articles/43726/Optimizing-string-operations-in-C
|
||||||
public static int FastIndexOf(this string source, string pattern)
|
public static int FastIndexOf(this string source, string pattern)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user