String substringFrom carefully checks bounds and throws an error if they're invalid. However, other functions in String.som call primSubstringFrom directly and sometimes seem to pass start==0, end==0, and end<start. What should primSubstringFrom do in such cases? Throw an error? Return the empty string? Or ... ?
String substringFromcarefully checks bounds and throws an error if they're invalid. However, other functions inString.somcallprimSubstringFromdirectly and sometimes seem to passstart==0,end==0, andend<start. What shouldprimSubstringFromdo in such cases? Throw an error? Return the empty string? Or ... ?