Back to index

lightning-sunbird  0.9+nobinonly
Functions
StringUtils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int strcasecmp (const char *str1, const char *str2)
 Case-insensitive string comparison.
char * strdup (const char *str)
 Duplicates a C string, returns NULL if failed, or passed NULL.

Function Documentation

int strcasecmp ( const char *  str1,
const char *  str2 
)

Case-insensitive string comparison.

Definition at line 94 of file strings.c.

{
       register char *cm = charmap;

       while (cm[*s1] == cm[*s2++])
              if (*s1++ == '\0')
                     return(0);
       return cm[*s1] - cm[*--s2];
}
char* strdup ( const char *  str)

Duplicates a C string, returns NULL if failed, or passed NULL.

Definition at line 122 of file strings.c.

{
       char   *r;

       r = (char *) malloc( strlen( p ) + 1 );
       if ( r != NULL ) {
              strcpy( r, p );
       }

       return( r );
}

Here is the call graph for this function: