Retrieves a sequence of characters. The characters that are retrieved
are those characters at positions from start.pos up to, but not
including end.pos. If end.pos is negative, then the the characters
retrieved are those characters from start.pos to the end of the text.