Merge branch 'master' of github.com:ShareX/ShareX

This commit is contained in:
Jaex 2015-08-20 18:44:56 +03:00
commit 30f5d7d539

View file

@ -278,8 +278,8 @@ public static string[] Lines(this string text)
int f = 0;
int b = 0;
while (text.Length > f
&& 0 < (f = text.IndexOf(front, f))
&& 0 < (b = text.IndexOf(back, f + front.Length)))
&& 0 <= (f = text.IndexOf(front, f))
&& 0 <= (b = text.IndexOf(back, f + front.Length)))
{
string result = text.Substring(f, (b + back.Length) - f);
yield return new Tuple<string, string>(result, result.Substring(front.Length, (result.Length - back.Length) - front.Length));