How would I split a string at a particular index? e.g split string at index 10, making the string now equal to everything up to index 10 and then dumping the remainder.
This should do it:s = s.substring(0,10);
s = s.substring(0,10);