IntlChar charType() 함수는 입력된 값에 대한 일반 범주 값을 가져오는 데 사용됩니다.
구문
int IntlChar::charType (val)
매개변수
-
val - UTF-8 문자열로 인코딩된 정수 또는 문자.
반환
IntlChar charType() 함수는 다음과 같은 일반 범주 콘텐츠를 반환합니다. -
-
IntlChar::CHAR_CATEGORY_UNASSIGNED
-
IntlChar::CHAR_CATEGORY_GENERAL_OTHER_TYPES
-
IntlChar::CHAR_CATEGORY_UPPERCASE_LETTER
-
IntlChar::CHAR_CATEGORY_LOWERCASE_LETTER
-
IntlChar::CHAR_CATEGORY_TITLECASE_LETTER
-
IntlChar::CHAR_CATEGORY_MODIFIER_LETTER
-
IntlChar::CHAR_CATEGORY_OTHER_LETTER
-
IntlChar::CHAR_CATEGORY_NON_SPACING_MARK
-
IntlChar::CHAR_CATEGORY_ENCLOSING_MARK
-
IntlChar::CHAR_CATEGORY_COMBINING_SPACING_MARK
-
IntlChar::CHAR_CATEGORY_DECIMAL_DIGIT_NUMBER
-
IntlChar::CHAR_CATEGORY_LETTER_NUMBER
-
IntlChar::CHAR_CATEGORY_OTHER_NUMBER
-
IntlChar::CHAR_CATEGORY_SPACE_SEPARATOR
-
IntlChar::CHAR_CATEGORY_LINE_SEPARATOR
-
IntlChar::CHAR_CATEGORY_PARAGRAPH_SEPARATOR
-
IntlChar::CHAR_CATEGORY_CONTROL_CHAR
-
IntlChar::CHAR_CATEGORY_FORMAT_CHAR
-
IntlChar::CHAR_CATEGORY_PRIVATE_USE_CHAR
-
IntlChar::CHAR_CATEGORY_SURROGATE
-
IntlChar::CHAR_CATEGORY_DASH_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_START_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_END_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_CONNECTOR_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_MATH_SYMBOL
-
IntlChar::CHAR_CATEGORY_CURRENCY_SYMBOL
-
IntlChar::CHAR_CATEGORY_MODIFIER_SYMBOL
-
IntlChar::CHAR_CATEGORY_OTHER_SYMBOL
-
IntlChar::CHAR_CATEGORY_INITIAL_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_FINAL_PUNCTUATION
-
IntlChar::CHAR_CATEGORY_CHAR_CATEGORY_COUNT
예시
다음은 예입니다 -
<?php var_dump(IntlChar::charType("n") === IntlChar::CHAR_CATEGORY_CONTROL_CHAR); echo "<br>"; var_dump(IntlChar::charType("jkl") === IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION); echo "<br>"; var_dump(IntlChar::charType("r") === IntlChar::CHAR_CATEGORY_CONTROL_CHAR); echo "<br>"; var_dump(IntlChar::charType("Z") === IntlChar::CHAR_CATEGORY_UPPERCASE_LETTER); echo "<br>"; var_dump(IntlChar::charType(".") === IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION); echo "<br>"; ?>
출력
다음은 출력입니다 -
bool(false) bool(false) bool(false) bool(true) bool(true)