Back to index

lightning-sunbird  0.9+nobinonly
Functions
strpbrk.c File Reference
#include "plstr.h"
#include <string.h>

Go to the source code of this file.

Functions

 PL_strpbrk (const char *s, const char *list)
 PL_strprbrk (const char *s, const char *list)
 PL_strnpbrk (const char *s, const char *list, PRUint32 max)
 PL_strnprbrk (const char *s, const char *list, PRUint32 max)

Function Documentation

PL_strnpbrk ( const char *  s,
const char *  list,
PRUint32  max 
)

Definition at line 69 of file strpbrk.c.

{
    const char *p;

    if( ((const char *)0 == s) || ((const char *)0 == list) ) return (char *)0;

    for( ; max && *s; s++, max-- )
        for( p = list; *p; p++ )
            if( *s == *p )
                return (char *)s;

    return (char *)0;
}

Here is the caller graph for this function:

PL_strnprbrk ( const char *  s,
const char *  list,
PRUint32  max 
)

Definition at line 84 of file strpbrk.c.

{
    const char *p;
    const char *r;

    if( ((const char *)0 == s) || ((const char *)0 == list) ) return (char *)0;

    for( r = s; max && *r; r++, max-- )
        ;

    for( r--; r >= s; r-- )
        for( p = list; *p; p++ )
            if( *r == *p )
                return (char *)r;

    return (char *)0;
}

Here is the caller graph for this function:

PL_strpbrk ( const char *  s,
const char *  list 
)

Definition at line 42 of file strpbrk.c.

{
    if( ((const char *)0 == s) || ((const char *)0 == list) ) return (char *)0;

    return strpbrk(s, list);
}

Here is the caller graph for this function:

PL_strprbrk ( const char *  s,
const char *  list 
)

Definition at line 50 of file strpbrk.c.

{
    const char *p;
    const char *r;

    if( ((const char *)0 == s) || ((const char *)0 == list) ) return (char *)0;

    for( r = s; *r; r++ )
        ;

    for( r--; r >= s; r-- )
        for( p = list; *p; p++ )
            if( *r == *p )
                return (char *)r;

    return (char *)0;
}

Here is the caller graph for this function: