If you have SRFI-13, you may find a more suitable function for getting a substring. First of all, substring/shared may return a string that shares storage with the original argument. SRFI-13 also defines a string-copy that takes start and end arguments, effectively making it a version of substring/shared that always allocates a new string.
Finally, if you need to take a substring from the start or end of a string, string-take and string-drop allow you to make a substring by taking or omitting characters from the start of a string. string-take-right and string-drop-right do the same from the end of a string.
-- GordonWeakliem - 22 Apr 2004