ContainsCharType
Mon 01 January 2018Syntax
ContainsCharType(source_str, char_code)
Description
Use the ContainsCharType function to determine if any of the characters in source_str are of type char_code. The char_code is a numerical value representing a character type (see the following Parameters section for details). Most character types supported by this function equate to specific Unicode character blocks or are based on Unicode character properties.
Parameters
|
Field or Control |
Definition |
|---|---|
| source_str |
String to be examined. |
| char_code |
A number value representing the character type to be tested for. The following table shows valid values. You can specify either a character code numeric value or a constant: |
|
Numeric Value |
Constant |
Character Set |
|---|---|---|
|
0 |
%CharType_AlphaNumeric |
Basic Latin â Alphanumeric (printable range of 7-bit US-ASCII), Unicode characters in the range U+0020 â U+007E |
|
1 |
%CharType_ExtendedLatin1 |
Extended Latin-1 characters (ISO 8859-1 accents for Western European languages), Unicode characters in the range U+00BF â U+07E |
|
2 |
%CharType_HankakuKatakana |
Hankaku Katakana (half-width Japanese Katakana) |
|
3 |
%CharType_ZenkakuKatakana |
Zenkaku Katakana (full-width Japanese Katakana) |
|
4 |
%CharType_Hiragana |
Hiragana (Japanese) |
|
5 |
%CharType_Kanji |
Chinese, Japanese and Korean ideographic characters. Includes Japanese Kanji, Chinese Hanzi and Korean Hancha. |
|
6 |
%CharType_DBAlphaNumeric |
Full-width Latin Alphanumeric characters, primarily used for Japanese. Excludes |
|
7 |
None |
Korean Hangul syllables, excluding Hangul Jamo. |
|
8,9 |
None |
Reserved for future use. |
|
10 |
%CharType_JapanesePunctuation |
Full- and half-width punctuation, including space (U+0020) and Fullwidth / Ideographic Space (U+3000). |
|
11 |
None |
Greek |
|
12 |
None |
Cyrillic |
|
13 |
None |
Armenian |
|
14 |
None |
Hebrew |
|
15 |
None |
Arabic |
|
16 |
None |
Devanagari |
|
17 |
None |
Bengali |
|
18 |
None |
Gurmukhi |
|
19 |
None |
Gujarati |
|
20 |
None |
Oriya |
|
21 |
None |
Tamil |
|
22 |
None |
Telugu |
|
23 |
None |
Kannada |
|
24 |
None |
Malayalam |
|
25 |
None |
Thai |
|
26 |
None |
Lao |
|
27 |
None |
Tibetan |
|
28 |
None |
Georgian |
|
29 |
None |
Bopomofo |
Returns
ContainsCharType returns one of the following Number values. You can check for the constant instead of the numeric value if you prefer:
|
Numeric Value |
Constant Value |
Description |
|---|---|---|
|
1 |
%CharType_Matched |
String contains at least one character of set char_code . |
|
0 |
%CharType_NotMatched |
String contains no characters of set char_code . |
|
-1 |
%CharType_Unknown |
UNKNOWN: unable to determine whether character is of set char_code. This occurs if the character being checked is an unallocated Unicode codepoint, or was added in a version of Unicode greater than that supported by PeopleTools. |