if (cstr[idx] == chr)
count++;
- /* if whole of start to end kept then return substring, including
- possibly s itself */
+ /* if whole of start to end kept then return substring */
if (count == cend - cstart)
- result = scm_i_substring_shared (s, cstart, cend);
+ {
+ result_substring:
+ result = scm_i_substring (s, cstart, cend);
+ }
else
result = scm_c_make_string (count, char_pred);
}
if (SCM_CHARSET_GET (char_pred, cstr[idx]))
count++;
- /* if whole of start to end kept then return substring, including
- possibly s itself */
+ /* if whole of start to end kept then return substring */
if (count == cend - cstart)
- result = scm_i_substring_shared (s, cstart, cend);
+ goto result_substring;
else
{
char *dst;
if (cstr[idx] != chr)
count++;
- /* if whole of start to end kept then return substring, including
- possibly s itself */
+ /* if whole of start to end kept then return substring */
if (count == cend - cstart)
{
result_substring:
- result = scm_i_substring_shared (s, cstart, cend);
+ result = scm_i_substring (s, cstart, cend);
}
else
{