An open-ended means of classifying characters. : Wide Character Functions « Wide Character String « C Tutorial

Home
C Tutorial
1.Language
2.Data Type
3.String
4.printf scanf
5.Operator
6.Statement
7.Array
8.Function
9.Structure
10.Pointer
11.Memory
12.Preprocessor
13.File
14.Data Structure
15.Search Sort
16.Wide Character String
17.assert.h
18.ctype.h
19.math.h
20.setjmp.h
21.signal.h
22.stdio.h
23.stdlib.h
24.string.h
25.time.h
26.wctype.h
C Tutorial » Wide Character String » Wide Character Functions 
16.1.7.An open-ended means of classifying characters.
Header filewctype.h
Declarationwctype_t wctype(const char *attr);
int iswctype(wint_t ch, wctype_t attr_ob);


  1. alnum
  2. digit
  3. print
  4. upper
  5. alpha
  6. graph
  7. punct
  8. xdigit
  9. cntrl
  10. lower
  11. space

The following fragment demonstrates the wctype() and iswctype() functions:

#include <wctype.h>
#include <stdio.h>

int main(void){

  wctype_t x;

  x = wctype("space");

  if(iswctype(L' ', x)){
    printf("Is a space.\n");
  }

}

(C: The Complete Reference, Fourth Edition by Herbert Schildt McGraw-Hill/Osborne 2000 ISBN-10: 0072121246, ISBN-13: 978-0072121247)

16.1.Wide Character Functions
16.1.1.Wide-Character Functions
16.1.2.Wide-Character I/O Functions
16.1.3.Wide-Character String Functions
16.1.4.Wide-Character String Conversion Functions
16.1.5.Wide-Character Array Functions
16.1.6.Multibyte/Wide-Character Conversion Functions
16.1.7.An open-ended means of classifying characters.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.