safec  3.5.1
Safe C Library - ISO TR24731 Bounds Checking Interface
towfc_s.c File Reference
#include "safe_str_lib.h"
+ Include dependency graph for towfc_s.c:

Functions

int iswfc (const uint32_t wc)
 
int _towfc_single (wchar_t *restrict dest, const uint32_t src)
 
EXPORT int _towfc_s_chk (wchar_t *restrict dest, rsize_t dmax, const uint32_t src, const size_t destbos)
 

Variables

struct {
   unsigned short   upper
 
   unsigned short   lower1
 
   unsigned short   lower2
 
tbl2 []
 iswfc() checks the uppercase character for a mapping to foldcase, returning the number of new wide character codepoints needed. More...
 
struct {
   unsigned short   upper
 
   unsigned short   lower1
 
   unsigned short   lower2
 
   unsigned short   lower3
 
tbl3 []
 

Function Documentation

◆ iswfc()

int iswfc ( const uint32_t  wc)

◆ _towfc_single()

int _towfc_single ( wchar_t *restrict  dest,
const uint32_t  src 
)

◆ _towfc_s_chk()

EXPORT int _towfc_s_chk ( wchar_t *restrict  dest,
rsize_t  dmax,
const uint32_t  src,
const size_t  destbos 
)

Variable Documentation

◆ upper

unsigned short upper

◆ lower1

unsigned short lower1

◆ lower2

unsigned short lower2

◆ tbl2

const { ... } tbl2[]

iswfc() checks the uppercase character for a mapping to foldcase, returning the number of new wide character codepoints needed.

The usual iswupper(wc) case returns 1, and the special 104 full folding cases as specified in Unicode 10.0 CaseFolding.txt return either 2 or 3.

Parameters
[in]wcunicode character codepoint
Return values
0when there is no corresponding lowercase mapping.
1when there is a corresponding common or simple foldcase mapping.
2a full case-folding expands to 2 characters
3a full case-folding expands to 3 characters
See also
towfc_s(), wcsfc_s(), towupper()

◆ lower3

unsigned short lower3

◆ tbl3

const { ... } tbl3[]