Public Types | Static Public Member Functions | Static Public Attributes

nsCharTraits< PRUnichar > Struct Template Reference

#include <nsCharTraits.h>

List of all members.

Public Types

typedef PRUnichar char_type
typedef PRUint16 unsigned_char_type
typedef char incompatible_char_type
typedef int int_type

Static Public Member Functions

static void assign (char_type &lhs, char_type rhs)
static char_type to_char_type (int_type c)
static int_type to_int_type (char_type c)
static nsCharTraits_bool eq_int_type (int_type lhs, int_type rhs)
static nsCharTraits_bool eq (char_type lhs, char_type rhs)
static nsCharTraits_bool lt (char_type lhs, char_type rhs)
static char_typemove (char_type *s1, const char_type *s2, size_t n)
static char_typecopy (char_type *s1, const char_type *s2, size_t n)
static char_typecopyASCII (char_type *s1, const char *s2, size_t n)
static char_typeassign (char_type *s, size_t n, char_type c)
static int compare (const char_type *s1, const char_type *s2, size_t n)
static int compareASCII (const char_type *s1, const char *s2, size_t n)
static int compareASCIINullTerminated (const char_type *s1, size_t n, const char *s2)
static char_type ASCIIToLower (char_type c)
 Convert c to its lower-case form, but only if the lower-case form is ASCII.
static int compareLowerCaseToASCII (const char_type *s1, const char *s2, size_t n)
static int compareLowerCaseToASCIINullTerminated (const char_type *s1, size_t n, const char *s2)
static size_t length (const char_type *s)
static const char_typefind (const char_type *s, size_t n, char_type c)

Static Public Attributes

static char_typesEmptyBuffer

template<>
struct nsCharTraits< PRUnichar >


Member Typedef Documentation

typedef int nsCharTraits< PRUnichar >::int_type

Member Function Documentation

static char_type nsCharTraits< PRUnichar >::ASCIIToLower ( char_type  c  )  [inline, static]

Convert c to its lower-case form, but only if the lower-case form is ASCII.

Otherwise leave it alone.

There are only two non-ASCII Unicode characters whose lowercase equivalents are ASCII: KELVIN SIGN and LATIN CAPITAL LETTER I WITH DOT ABOVE. So it's a simple matter to handle those explicitly.

static char_type* nsCharTraits< PRUnichar >::assign ( char_type s,
size_t  n,
char_type  c 
) [inline, static]
static void nsCharTraits< PRUnichar >::assign ( char_type lhs,
char_type  rhs 
) [inline, static]
static int nsCharTraits< PRUnichar >::compare ( const char_type s1,
const char_type s2,
size_t  n 
) [inline, static]
static int nsCharTraits< PRUnichar >::compareASCII ( const char_type s1,
const char *  s2,
size_t  n 
) [inline, static]
static int nsCharTraits< PRUnichar >::compareASCIINullTerminated ( const char_type s1,
size_t  n,
const char *  s2 
) [inline, static]
static int nsCharTraits< PRUnichar >::compareLowerCaseToASCII ( const char_type s1,
const char *  s2,
size_t  n 
) [inline, static]
static int nsCharTraits< PRUnichar >::compareLowerCaseToASCIINullTerminated ( const char_type s1,
size_t  n,
const char *  s2 
) [inline, static]
static char_type* nsCharTraits< PRUnichar >::copy ( char_type s1,
const char_type s2,
size_t  n 
) [inline, static]
static char_type* nsCharTraits< PRUnichar >::copyASCII ( char_type s1,
const char *  s2,
size_t  n 
) [inline, static]
static nsCharTraits_bool nsCharTraits< PRUnichar >::eq ( char_type  lhs,
char_type  rhs 
) [inline, static]
static nsCharTraits_bool nsCharTraits< PRUnichar >::eq_int_type ( int_type  lhs,
int_type  rhs 
) [inline, static]
static const char_type* nsCharTraits< PRUnichar >::find ( const char_type s,
size_t  n,
char_type  c 
) [inline, static]
static size_t nsCharTraits< PRUnichar >::length ( const char_type s  )  [inline, static]
static nsCharTraits_bool nsCharTraits< PRUnichar >::lt ( char_type  lhs,
char_type  rhs 
) [inline, static]
static char_type* nsCharTraits< PRUnichar >::move ( char_type s1,
const char_type s2,
size_t  n 
) [inline, static]
static char_type nsCharTraits< PRUnichar >::to_char_type ( int_type  c  )  [inline, static]
static int_type nsCharTraits< PRUnichar >::to_int_type ( char_type  c  )  [inline, static]

Member Data Documentation


The documentation for this struct was generated from the following file: