is, isw 루틴is, isw Routines

isalnum, iswalnum, _isalnum_l, _iswalnum_lisalnum, iswalnum, _isalnum_l, _iswalnum_l isgraph, iswgraph, _isgraph_l, _iswgraph_lisgraph, iswgraph, _isgraph_l, _iswgraph_l
isalpha, iswalpha, _isalpha_l, _iswalpha_lisalpha, iswalpha, _isalpha_l, _iswalpha_l isleadbyte, _isleadbyte_lisleadbyte, _isleadbyte_l
isascii, __isascii, iswasciiisascii, __isascii, iswascii islower, iswlower, _islower_l, _iswlower_lislower, iswlower, _islower_l, _iswlower_l
isblank, iswblank, _isblank_l, _iswblank_lisblank, iswblank, _isblank_l, _iswblank_l isprint, iswprint, _isprint_l, _iswprint_lisprint, iswprint, _isprint_l, _iswprint_l
iscntrl, iswcntrl, _iscntrl_l, _iswcntrl_liscntrl, iswcntrl, _iscntrl_l, _iswcntrl_l ispunct, iswpunct, _ispunct_l, _iswpunct_lispunct, iswpunct, _ispunct_l, _iswpunct_l
iscsym, iscsymf, __iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_liscsym, iscsymf, __iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_l isspace, iswspace, _isspace_l, _iswspace_lisspace, iswspace, _isspace_l, _iswspace_l
_isctype, iswctype, _isctype_l, _iswctype_l_isctype, iswctype, _isctype_l, _iswctype_l isupper, _isupper_l, iswupper, _iswupper_lisupper, _isupper_l, iswupper, _iswupper_l
isdigit, iswdigit, _isdigit_l, _iswdigit_lisdigit, iswdigit, _isdigit_l, _iswdigit_l isxdigit, iswxdigit, _isxdigit_l, _iswxdigit_lisxdigit, iswxdigit, _isxdigit_l, _iswxdigit_l

주의Remarks

이러한 루틴은 지정한 조건에 대해 문자를 테스트합니다.These routines test characters for specified conditions.

is 루틴은 -1(EOF)에서 UCHAR_MAX(0xFF)(포함)까지 정수 인수에 대해 의미 있는 결과를 생성합니다.The is routines produce meaningful results for any integer argument from -1 (EOF) to UCHAR_MAX (0xFF), inclusive. 필요한 인수 형식은 int입니다.The expected argument type is int.

주의

is 루틴의 경우 char 형식의 인수를 전달하면 예기치 않은 결과가 발생할 수 있습니다.For the is routines, passing an argument of type char may yield unpredictable results. 값이 0x7F보다 큰 char 형식의 SBCS 또는 MBCS 싱글바이트 문자는 음수입니다.An SBCS or MBCS single-byte character of type char with a value greater than 0x7F is negative. char이 전달되면 컴파일러는 값을 부호 있는 int 또는 부호 있는 long으로 변환할 수 있습니다.If a char is passed, the compiler may convert the value to a signed int or a signed long. 이 값은 컴파일러에서 부호 확장될 수 있으며 예기치 않은 결과가 발생할 수 있습니다.This value may be sign-extended by the compiler, with unexpected results.

isw 루틴은 - 1(WEOF)에서 0xFFFF(포함)까지 정수 값에 대해 의미 있는 결과를 생성합니다.The isw routines produce meaningful results for any integer value from - 1 (WEOF) to 0xFFFF, inclusive. wint_t 데이터 형식은 unsigned short로 WCHAR.H에 정의됩니다. 와이드 문자 또는 와이드 문자 파일 끝(WEOF) 값을 가질 수 있습니다.The wint_t data type is defined in WCHAR.H as an unsigned short; it can hold any wide character or the wide-character end-of-file (WEOF) value.

출력값은 로캘의 LC_CTYPE 범주 설정에 영향을 받습니다. 자세한 내용은 setlocale을 참조하세요.The output value is affected by the setting of the LC_CTYPE category setting of the locale; see setlocale for more information. _l 접미사가 없는 이러한 함수 버전은 이 로캘 종속 동작에 현재 로캘을 사용하며, _l 접미사가 있는 버전은 전달된 로캘 매개 변수를 대신 사용하는 경우를 제외하고는 동일합니다.The versions of these functions without the _l suffix use the current locale for this locale-dependent behavior; the versions with the _l suffix are identical except that they use the locale parameter passed in instead.

"C" 로캘에서 is 루틴에 대한 테스트 조건은 다음과 같습니다.In the "C" locale, the test conditions for the is routines are as follows:

isalnum
영숫자(A-Z, a-z 또는 0-9)Alphanumeric (A - Z, a - z, or 0 - 9).

isalpha
알파벳(A-Z 또는 a-z)Alphabetic (A - Z or a - z).

__isascii
ASCII 문자(0x00-0x7F)ASCII character (0x00 - 0x7F).

isblank
가로 탭 또는 공백 문자(0x09 또는 0x20)Horizontal tab or space character (0x09 or 0x20).

iscntrl
제어 문자(0x00 - 0x1F 또는 0x7F)Control character (0x00 - 0x1F or 0x7F).

__iscsym
문자, 밑줄 또는 숫자Letter, underscore, or digit.

__iscsymf
문자 또는 밑줄Letter or underscore.

isdigitisdigit
10진수(0-9)Decimal digit (0 - 9).

isgraph
공백을 제외한 인쇄 가능한 문자()Printable character except space ( ).

islower
소문자(a ~ z)Lowercase letter (a - z).

isprint
공백을 포함한 인쇄 가능한 문자(0x20-0x7E)Printable character including space (0x20 - 0x7E).

ispunct
문장 부호 문자Punctuation character.

isspace
공백 문자(0x09-0x0D 또는 0x20)White-space character (0x09 - 0x0D or 0x20).

isupper
대문자(A ~ Z)Uppercase letter (A - Z).

isxdigit
16진수(A-F, a-f 또는 0-9)Hexadecimal digit (A - F, a - f, or 0 - 9).

isw 루틴의 경우 지정된 조건의 테스트 결과는 로캘과 무관합니다.For the isw routines, the result of the test for the specified condition is independent of locale. isw 함수에 대한 테스트 조건은 다음과 같습니다.The test conditions for the isw functions are as follows:

iswalnum
iswalpha 또는 iswdigitiswalpha or iswdigit.

iswalpha
iswcntrl, iswdigit, iswpunct, iswspace가 모두 0인 구현 시 정의된 집합 중 하나인 와이드 문자.Any wide character that is one of an implementation-defined set for which none of iswcntrl, iswdigit, iswpunct, or iswspace is nonzero. iswalphaiswupper 또는 iswlower가 0이 아닌 와이드 문자에 대해서는 0이 아닌 값을 반환합니다.iswalpha returns nonzero only for wide characters for which iswupper or iswlower is nonzero.

iswascii
ASCII 문자의 와이드 문자 표현(0x0000-0x007F)Wide-character representation of ASCII character (0x0000 - 0x007F).

iswblank
표준 공백 문자에 해당하거나 iswalnum이 false인 경우 구현 시 정의된 와이드 문자 집합 중 하나인 와이드 문자.Wide character that corresponds to the standard space character or is one of an implementation-defined set of wide characters for which iswalnum is false. 표준 공백 문자는 공백(L' ') 및 가로 탭(L'\t')입니다.Standard blank characters are space (L' ') and horizontal tab (L'\t').

iswcntrl
제어 와이드 문자Control wide character.

__iswcsym__iswcsym
isalnum이 true인 경우 와이드 문자 또는 '' 문자Any wide character for which isalnum is true, or the '' character.

__iswcsymf__iswcsymf
iswalpha가 true인 경우 와이드 문자 또는 '' 문자Any wide character for which iswalpha is true, or the '' character.

iswctype
문자에 desc 인수에 의해 지정된 속성이 있습니다.Character has property specified by the desc argument. 다음 표에 표시된 것처럼, iswctypedesc 인수에 유효한 각 값에 대해 해당하는 와이드 문자 분류 루틴이 있습니다.For each valid value of the desc argument of iswctype, there is an equivalent wide-character classification routine, as shown in the following table:

기타 isw 테스트 루틴에 대한 iswctype( Equivalence of iswctype(
c, desc) 동등성c, desc ) to Other isw Testing Routines

desc 인수 값Value of desc argument 해당 iswctype( c, desc )iswctype( c, desc ) equivalent
_ALPHA_ALPHA iswalpha( c )iswalpha( c )
_ALPHA | _DIGIT_ALPHA | _DIGIT iswalnum( c )iswalnum( c )
_BLANK_BLANK iswblank( c )iswblank( c )
_CONTROL_CONTROL iswcntrl( c )iswcntrl( c )
_DIGIT_DIGIT iswdigit( c )iswdigit( c )
_ALPHA | _DIGIT | _PUNCT_ALPHA | _DIGIT | _PUNCT iswgraph( c )iswgraph( c )
_LOWER_LOWER iswlower( c )iswlower( c )
_ALPHA | _BLANK | _DIGIT | _PUNCT_ALPHA | _BLANK | _DIGIT | _PUNCT iswprint( c )iswprint( c )
_PUNCT_PUNCT iswpunct( c )iswpunct( c )
_BLANK_BLANK iswblank( c )iswblank( c )
_SPACE_SPACE iswspace( c )iswspace( c )
_UPPER_UPPER iswupper( c )iswupper( c )
_HEX_HEX iswxdigit( c )iswxdigit( c )

iswdigit
10진수 문자에 해당하는 와이드 문자Wide character corresponding to a decimal-digit character.

iswgraph
공백 와이드 문자(L' ')를 제외한 인쇄 가능한 와이드 문자Printable wide character except space wide character (L' ').

iswlower
소문자이거나 iswcntrl, iswdigit, iswpunct, iswspace가 모두 0인 구현 시 정의된 와이드 문자 집합 중 하나.Lowercase letter, or one of implementation-defined set of wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace is nonzero. iswlower는 소문자에 해당하는 와이드 문자에 대해서만 0이 아닌 값을 반환합니다.iswlower returns nonzero only for wide characters that correspond to lowercase letters.

iswprint
공백 와이드 문자(L' ')를 포함한 인쇄 가능한 와이드 문자Printable wide character, including space wide character (L' ').

iswpunct
iswalnum이 0이 아닌 와이드 문자도 공백 와이드 문자(L' ')도 아닌 인쇄 가능한 와이드 문자Printable wide character that is neither space wide character (L' ') nor wide character for which iswalnum is nonzero.

iswspace
표준 공백 문자에 해당하거나 iswalnum이 false인 경우 구현 시 정의된 와이드 문자 집합 중 하나인 와이드 문자.Wide character that corresponds to standard white-space character or is one of implementation-defined set of wide characters for which iswalnum is false. 표준 공백 문자: 공백(L' '), 용지 공급(L'\f'), 줄 바꿈(L'\n'), 캐리지 리턴(L'\r'), 가로 탭(L'\t'), 세로 탭(L'\v')Standard white-space characters are: space (L' '), formfeed (L'\f'), newline (L'\n'), carriage return (L'\r'), horizontal tab (L'\t'), and vertical tab (L'\v').

iswupper
대문자이거나 iswcntrl, iswdigit, iswpunct, iswspace가 모두 0인 구현 시 정의된 와이드 문자 집합 중 하나인 와이드 문자.Wide character that is uppercase or is one of an implementation-defined set of wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace is nonzero. iswupper는 대문자에 해당하는 와이드 문자에 대해서만 0이 아닌 값을 반환합니다.iswupper returns nonzero only for wide characters that correspond to uppercase characters.

iswxdigit
16진수 문자에 해당하는 와이드 문자Wide character that corresponds to a hexadecimal-digit character.

예제Example

// crt_isfam.c  
/* This program tests all characters between 0x0  
 * and 0x7F, then displays each character with abbreviations  
 * for the character-type codes that apply.  
 */  

#include <stdio.h>  
#include <ctype.h>  

int main( void )  
{  
   int ch;  
   for( ch = 0; ch <= 0x7F; ch++ )  
   {  
      printf( "%.2x  ", ch );  
      printf( " %c", isprint( ch )  ? ch   : ' ' );  
      printf( "%4s", isalnum( ch )  ? "AN" : "" );  
      printf( "%3s", isalpha( ch )  ? "A"  : "" );  
      printf( "%3s", __isascii( ch )  ? "AS" : "" );  
      printf( "%3s", iscntrl( ch )  ? "C"  : "" );  
      printf( "%3s", __iscsym( ch )  ? "CS "  : "" );  
      printf( "%3s", __iscsymf( ch )  ? "CSF"  : "" );  
      printf( "%3s", isdigit( ch )  ? "D"  : "" );  
      printf( "%3s", isgraph( ch )  ? "G"  : "" );  
      printf( "%3s", islower( ch )  ? "L"  : "" );  
      printf( "%3s", ispunct( ch )  ? "PU" : "" );  
      printf( "%3s", isspace( ch )  ? "S"  : "" );  
      printf( "%3s", isprint( ch )  ? "PR" : "" );  
      printf( "%3s", isupper( ch )  ? "U"  : "" );  
      printf( "%3s", isxdigit( ch ) ? "X"  : "" );  
      printf( ".\n" );  
   }  
}  

출력Output

00            AS  C                              .  
01            AS  C                              .  
02            AS  C                              .  
03            AS  C                              .  
04            AS  C                              .  
05            AS  C                              .  
06            AS  C                              .  
07            AS  C                              .  
08            AS  C                              .  
09            AS  C                    S         .  
0a            AS  C                    S         .  
0b            AS  C                    S         .  
0c            AS  C                    S         .  
0d            AS  C                    S         .  
0e            AS  C                              .  
0f            AS  C                              .  
10            AS  C                              .  
11            AS  C                              .  
12            AS  C                              .  
13            AS  C                              .  
14            AS  C                              .  
15            AS  C                              .  
16            AS  C                              .  
17            AS  C                              .  
18            AS  C                              .  
19            AS  C                              .  
1a            AS  C                              .  
1b            AS  C                              .  
1c            AS  C                              .  
1d            AS  C                              .  
1e            AS  C                              .  
1f            AS  C                              .  
20            AS                       S PR      .  
21   !        AS              G    PU    PR      .  
22   "        AS              G    PU    PR      .  
23   #        AS              G    PU    PR      .  
24   $        AS              G    PU    PR      .  
25   %        AS              G    PU    PR      .  
26   &        AS              G    PU    PR      .  
27   '        AS              G    PU    PR      .  
28   (        AS              G    PU    PR      .  
29   )        AS              G    PU    PR      .  
2a   *        AS              G    PU    PR      .  
2b   +        AS              G    PU    PR      .  
2c   ,        AS              G    PU    PR      .  
2d   -        AS              G    PU    PR      .  
2e   .        AS              G    PU    PR      .  
2f   /        AS              G    PU    PR      .  
30   0  AN    AS   CS      D  G          PR     X.  
31   1  AN    AS   CS      D  G          PR     X.  
32   2  AN    AS   CS      D  G          PR     X.  
33   3  AN    AS   CS      D  G          PR     X.  
34   4  AN    AS   CS      D  G          PR     X.  
35   5  AN    AS   CS      D  G          PR     X.  
36   6  AN    AS   CS      D  G          PR     X.  
37   7  AN    AS   CS      D  G          PR     X.  
38   8  AN    AS   CS      D  G          PR     X.  
39   9  AN    AS   CS      D  G          PR     X.  
3a   :        AS              G    PU    PR      .  
3b   ;        AS              G    PU    PR      .  
3c   <        AS              G    PU    PR      .  
3d   =        AS              G    PU    PR      .  
3e   >        AS              G    PU    PR      .  
3f   ?        AS              G    PU    PR      .  
40   @        AS              G    PU    PR      .  
41   A  AN  A AS   CS CSF     G          PR  U  X.  
42   B  AN  A AS   CS CSF     G          PR  U  X.  
43   C  AN  A AS   CS CSF     G          PR  U  X.  
44   D  AN  A AS   CS CSF     G          PR  U  X.  
45   E  AN  A AS   CS CSF     G          PR  U  X.  
46   F  AN  A AS   CS CSF     G          PR  U  X.  
47   G  AN  A AS   CS CSF     G          PR  U   .  
48   H  AN  A AS   CS CSF     G          PR  U   .  
49   I  AN  A AS   CS CSF     G          PR  U   .  
4a   J  AN  A AS   CS CSF     G          PR  U   .  
4b   K  AN  A AS   CS CSF     G          PR  U   .  
4c   L  AN  A AS   CS CSF     G          PR  U   .  
4d   M  AN  A AS   CS CSF     G          PR  U   .  
4e   N  AN  A AS   CS CSF     G          PR  U   .  
4f   O  AN  A AS   CS CSF     G          PR  U   .  
50   P  AN  A AS   CS CSF     G          PR  U   .  
51   Q  AN  A AS   CS CSF     G          PR  U   .  
52   R  AN  A AS   CS CSF     G          PR  U   .  
53   S  AN  A AS   CS CSF     G          PR  U   .  
54   T  AN  A AS   CS CSF     G          PR  U   .  
55   U  AN  A AS   CS CSF     G          PR  U   .  
56   V  AN  A AS   CS CSF     G          PR  U   .  
57   W  AN  A AS   CS CSF     G          PR  U   .  
58   X  AN  A AS   CS CSF     G          PR  U   .  
59   Y  AN  A AS   CS CSF     G          PR  U   .  
5a   Z  AN  A AS   CS CSF     G          PR  U   .  
5b   [        AS              G    PU    PR      .  
5c   \        AS              G    PU    PR      .  
5d   ]        AS              G    PU    PR      .  
5e   ^        AS              G    PU    PR      .  
5f   _        AS   CS CSF     G    PU    PR      .  
60   `        AS              G    PU    PR      .  
61   a  AN  A AS   CS CSF     G  L       PR     X.  
62   b  AN  A AS   CS CSF     G  L       PR     X.  
63   c  AN  A AS   CS CSF     G  L       PR     X.  
64   d  AN  A AS   CS CSF     G  L       PR     X.  
65   e  AN  A AS   CS CSF     G  L       PR     X.  
66   f  AN  A AS   CS CSF     G  L       PR     X.  
67   g  AN  A AS   CS CSF     G  L       PR      .  
68   h  AN  A AS   CS CSF     G  L       PR      .  
69   i  AN  A AS   CS CSF     G  L       PR      .  
6a   j  AN  A AS   CS CSF     G  L       PR      .  
6b   k  AN  A AS   CS CSF     G  L       PR      .  
6c   l  AN  A AS   CS CSF     G  L       PR      .  
6d   m  AN  A AS   CS CSF     G  L       PR      .  
6e   n  AN  A AS   CS CSF     G  L       PR      .  
6f   o  AN  A AS   CS CSF     G  L       PR      .  
70   p  AN  A AS   CS CSF     G  L       PR      .  
71   q  AN  A AS   CS CSF     G  L       PR      .  
72   r  AN  A AS   CS CSF     G  L       PR      .  
73   s  AN  A AS   CS CSF     G  L       PR      .  
74   t  AN  A AS   CS CSF     G  L       PR      .  
75   u  AN  A AS   CS CSF     G  L       PR      .  
76   v  AN  A AS   CS CSF     G  L       PR      .  
77   w  AN  A AS   CS CSF     G  L       PR      .  
78   x  AN  A AS   CS CSF     G  L       PR      .  
79   y  AN  A AS   CS CSF     G  L       PR      .  
7a   z  AN  A AS   CS CSF     G  L       PR      .  
7b   {        AS              G    PU    PR      .  
7c   |        AS              G    PU    PR      .  
7d   }        AS              G    PU    PR      .  
7e   ~        AS              G    PU    PR      .  
7f            AS  C                              .  

참고 항목See Also

문자 분류 Character Classification
로캘 Locale
setlocale, _wsetlocale setlocale, _wsetlocale
멀티바이트 문자 시퀀스 해석 Interpretation of Multibyte-Character Sequences
to 함수to Functions