Classes | Functions

nsCRTGlue.h File Reference

#include "nscore.h"
Include dependency graph for nsCRTGlue.h:
This graph shows which files directly or indirectly include this file:


class  nsLowerUpperUtils


const char * NS_strspnp (const char *delims, const char *str)
 Scan a string for the first character that is *not* in a set of delimiters.
char * NS_strtok (const char *delims, char **str)
 Tokenize a string.
PRUint32 NS_strlen (const PRUnichar *aString)
 "strlen" for PRUnichar strings
int NS_strcmp (const PRUnichar *a, const PRUnichar *b)
 "strcmp" for PRUnichar strings
PRUnicharNS_strdup (const PRUnichar *aString)
 "strdup" for PRUnichar strings, uses the NS_Alloc allocator.
char * NS_strdup (const char *aString)
 "strdup", but using the NS_Alloc allocator.
PRUnicharNS_strndup (const PRUnichar *aString, PRUint32 aLen)
 strndup for PRUnichar strings...
char NS_ToUpper (char aChar)
char NS_ToLower (char aChar)
PRBool NS_IsUpper (char aChar)
PRBool NS_IsLower (char aChar)
PRBool NS_IsAscii (PRUnichar aChar)
PRBool NS_IsAscii (const PRUnichar *aString)
PRBool NS_IsAsciiAlpha (PRUnichar aChar)
PRBool NS_IsAsciiDigit (PRUnichar aChar)
PRBool NS_IsAsciiWhitespace (PRUnichar aChar)
PRBool NS_IsAscii (const char *aString)
PRBool NS_IsAscii (const char *aString, PRUint32 aLength)

Function Documentation

PRBool NS_IsAscii ( PRUnichar  aChar  ) 
PRBool NS_IsAscii ( const char *  aString  ) 
PRBool NS_IsAscii ( const char *  aString,
PRUint32  aLength 
PRBool NS_IsAscii ( const PRUnichar aString  ) 
PRBool NS_IsAsciiAlpha ( PRUnichar  aChar  ) 
PRBool NS_IsAsciiDigit ( PRUnichar  aChar  ) 
PRBool NS_IsAsciiWhitespace ( PRUnichar  aChar  ) 
PRBool NS_IsLower ( char  aChar  ) 
PRBool NS_IsUpper ( char  aChar  ) 
int NS_strcmp ( const PRUnichar a,
const PRUnichar b 

"strcmp" for PRUnichar strings

PRUnichar* NS_strdup ( const PRUnichar aString  ) 

"strdup" for PRUnichar strings, uses the NS_Alloc allocator.

char* NS_strdup ( const char *  aString  ) 

"strdup", but using the NS_Alloc allocator.

PRUint32 NS_strlen ( const PRUnichar aString  ) 

"strlen" for PRUnichar strings

PRUnichar* NS_strndup ( const PRUnichar aString,
PRUint32  aLen 

strndup for PRUnichar strings...

this function will ensure that the new string is null-terminated. Uses the NS_Alloc allocator.

const char* NS_strspnp ( const char *  delims,
const char *  str 

Scan a string for the first character that is *not* in a set of delimiters.

If the string is only delimiter characters, the end of the string is returned.

delims The set of delimiters (null-terminated)
str The string to search (null-terminated)
char* NS_strtok ( const char *  delims,
char **  str 

Tokenize a string.

This function is similar to the strtok function in the C standard library, but it does not use static variables to maintain state and is therefore thread and reentrancy-safe.

Any leading delimiters in str are skipped. Then the string is scanned until an additional delimiter or end-of-string is found. The final delimiter is set to ''.

delims The set of delimiters.
str The string to search. This is an in-out parameter; it is reset to the end of the found token + 1, or to the end-of-string if there are no more tokens.
The token. If no token is found (the string is only delimiter characters), NULL is returned.
char NS_ToLower ( char  aChar  )  [inline]
char NS_ToUpper ( char  aChar  )  [inline]