13.07.2015 Views

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2−44PCP Reference Manualwcrtomb(*s,wc,*ps)btowc(c)wctob(c)Converts a wide character wc to amulti−byte character according toconversion state ps and stores themulti−byte character in *s.Returns the wide charactercorresponding to character c. ReturnsWEOF on error.Returns the multi−byte charactercorresponding to the wide character c.The returned multi−byte character isrepresented as one byte. Returns EOFon error.mbrlen(*s,n,*ps) Inspects up to n bytes from the string *sto see if those characters represent validmultibyte characters, relative to theconversion state held in *ps.2.2.25 WCTYPE.HMost functions in wctype.h represent the wide−character variant offunctions declared in ctype.h and are discussed in section 2.2.2, ctype.h.In addition, this header file provides extensible, locale specific functionsand wide character classification.LIBRARIESwctype(*property)iswctype(wc,desc)Functioniswalnum(wc)iswalpha(wc)iswcntrl(wc)iswdigit(wc)iswgraph(wc)Constructs a value of type wctype_t that describesa class of wide characters identified by the string*property. If property identifies a valid class of widecharacters according to the LC_TYPE category (see2.2.11, locale.h) of the current locale, a non−zerovalue is returned that can be used as an argumentin the iswctype function.Tests whether the wide character wc is a member ofthe class represented by wctype_t desc. Returns anon−zero value if tested true.Equivalent to locale specific testiswctype(wc,wctype("alnum"))iswctype(wc,wctype("alpha"))iswctype(wc,wctype("cntrl"))iswctype(wc,wctype("digit"))iswctype(wc,wctype("graph"))

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!