Back to index

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

Go to the source code of this file.

Functions

 PL_strcmp (const char *a, const char *b)
 PL_strncmp (const char *a, const char *b, PRUint32 max)

Function Documentation

PL_strcmp ( const char *  a,
const char *  b 
)

Definition at line 42 of file strcmp.c.

{
    if( ((const char *)0 == a) || (const char *)0 == b ) 
        return (PRIntn)(a-b);

    return (PRIntn)strcmp(a, b);
}
PL_strncmp ( const char *  a,
const char *  b,
PRUint32  max 
)

Definition at line 51 of file strcmp.c.

{
    if( ((const char *)0 == a) || (const char *)0 == b ) 
        return (PRIntn)(a-b);

    return (PRIntn)strncmp(a, b, (size_t)max);
}