Is there a function in c# which copies a string like so:
int x = 0;
int y = 2;
string test = "whatever";
i want to copy like so:
string one = test(x, y) where x is the starting character and y is the ending character so in this example one would be "wha".
then I want to change x and y
x = 3;
y = 7;
string two = test(x, y) would result in "tever"
The buit in substring function either takes two indexes and copies from first index trough the second index, or one index and copies from begining to the end of the string. I want to be able to specify the beginning and ending indexes. Thank you very much.