Strings:
string one = @"first%second";
string two = @"first%second%third";
string three = @"first%second%third%fourth";
I need to be able to separate everything that comes after the first '%' delimiter. I'd normally use split function:
string partofstring = one.Split('%').Last();
or
string partofstring = one.Split('%').[1];
However I need to be able to get:
string oneresult = @"second";
string tworesult = @"second%third";
string threresult = @"second%third%fourth";
string two = @"first%second%third"; var result = two.Split(new[] { '%' }, 2).Last();three.Split('%', 2)[1]