added a function slice(char string*, int start, int end) which gives the string content between the start and end indexes of the string