...wanna know why?
Because it uses an index and a string length, which is useless for me know.
Is there any way to do this, a Sunstring function that returns a string from index to index?
Like, a module or a good workaround?
Substring( startIndex, endIndex - startIndex ) perhaps?
Quote from: AJA on Tue 27/10/2009 16:02:16
Substring( startIndex, endIndex - startIndex ) perhaps?
Actually Substring( startIndex, endIndex - startIndex
+1)
Uhm. Oops. Yes.... thank you two.
To simplify things for yourself you could write an extender:
String Substring2(this String*, int start, int end) {
return this.Substring(start, end - start + 1);
}
String s = "Hello world!";
String t = s.Substring2(6, 10);
Display(t); // Displays "world"
I'm going to write the module for that.
Expect a beta version around December.