Logo Search packages:      
Sourcecode: fuse-umfuse-fat version File versions  Download package

wchar_t unicode_simple_fold ( wchar_t  wc  ) 

Simple case folding of a wide character.

Parameters:
wc the wide character to fold.
Returns:
If a simple folding is defined, the folded version of wc is returned, otherwise wc is returned unchanged.
Remarks:
This function performs simple case folding using two accesses in large lookup tables.
Case folding provides a mapping between characters that only differ in case. This is useful for case insensitive comparison. Simple case folding maps a single wide character to another single wide character (usually lower case). Full case folding, instead, may map a single wide character to more wide characters.

Definition at line 550 of file simple_fold.c.

{
      if ((wc >= 0) && (wc < 0x10000))
      {
            const uint16_t *p = pages[wc >> 8];
            if (p) wc = (wchar_t) p[wc & 0xFF];
      }
      else if ((wc >= 0x10400) && (wc <= 0x10427)) wc += 0x28;
      return wc;
}


Generated by  Doxygen 1.6.0   Back to index