util.c
/* same as instr but allow embedded nulls.  The end pointers point to 1 beyond
 * the final character desired to be checked */
same as instr but allow embedded nulls.  The end pointers point to 1 beyond
the final character desired to be checked
same as instr but allow embedded nulls . The end pointers point to 1 beyond the final character desired to be checked
char *
Perl_ninstr(const char *big, const char *bigend, const char *little, const char *lend)
{
    PERL_ARGS_ASSERT_NINSTR;
    if (little >= lend)
        return (char*)big;
    {
        const char first = *little;
        const char *s, *x;
        bigend -= lend - little++;
    OUTER:
        while (big <= bigend) {
            if (*big++ == first) {
                for (x=big,s=little; s < lend; x++,s++) {
                    if (*s != *x)
                        goto OUTER;
                }
                return (char*)(big-1);
            }
        }
    }
    return NULL;
}
char * Perl_ninstr ( const char * big , const char * bigend , const char * little , const char * lend ) { PERL_ARGS_ASSERT_NINSTR ; if ( little >= lend ) return ( char * ) big ; { const char first = * little ; const char * s , * x ; bigend -= lend - little ++ ; OUTER : while ( big <= bigend ) { if ( * big ++ == first ) { for ( x = big , s = little ; s < lend ; x ++ , s ++ ) { if ( * s != * x ) goto OUTER ; } return ( char * ) ( big - 1 ) ; } } } return NULL ; }
same as instr but allow embedded nulls.
same as instr but allow embedded nulls .