util.c
/* copy a string up to some (non-backslashed) delimiter, if any */
copy a string up to some (non-backslashed) delimiter, if any
copy a string up to some ( non - backslashed ) delimiter if any
char *
Perl_delimcpy(register char *to, register const char *toend, register const char *from, register const char *fromend, register int delim, I32 *retlen)
{
    register I32 tolen;
    PERL_ARGS_ASSERT_DELIMCPY;
    for (tolen = 0; from < fromend; from++, tolen++) {
	if (*from == '\\') {
	    if (from[1] != delim) {
		if (to < toend)
		    *to++ = *from;
		tolen++;
	    }
	    from++;
	}
	else if (*from == delim)
	    break;
	if (to < toend)
	    *to++ = *from;
    }
    if (to < toend)
	*to = '\0';
    *retlen = tolen;
    return (char *)from;
}
char * Perl_delimcpy ( register char * to , register const char * toend , register const char * from , register const char * fromend , register int delim , I32 * retlen ) { register I32 tolen ; PERL_ARGS_ASSERT_DELIMCPY ; for ( tolen = 0 ; from < fromend ; from ++ , tolen ++ ) { if ( * from == ' \\ ' ) { if ( from [ 1 ] != delim ) { if ( to < toend ) * to ++ = * from ; tolen ++ ; } from ++ ; } else if ( * from == delim ) break ; if ( to < toend ) * to ++ = * from ; } if ( to < toend ) * to = ' \0 ' ; * retlen = tolen ; return ( char * ) from ; }
copy a string up to some (non-backslashed) delimiter, if any
copy a string up to some ( non - backslashed ) delimiter if any