CHKCTYPE(3J) — NEWS-OS Programmer’s Manual
名称
chkctype, nthctype − 文字列内のキャラクタの分類
形式
#include <jctype.h>
int chkctype(c, prev_ctype)
char c;
int prev_ctype;
int nthctype(string, nbyte)
char ∗string;
int nbyte;"
解説
chkctype は、 c の直前のキャラクタのタイプが prev_ctype である状況で、 c のキャラクタタイプを返します。 キャラクタタイプ prev_type およびリターン値は、次のように定義されます。
#define CT_ASC0/∗ 1 バイトコード (ASCII キャラクタ) ∗/
#define CT_KJ11/∗ 2 バイトコードの第 1 バイト ∗/
#define CT_KJ22/∗ 2 バイトコードの第 2 バイト ∗/
#define CT_ILGL−1 /∗ 不当なキャラクタコード ∗/
c がナル文字であるか、 または 2 バイトコードの第 2 バイトとして不適当な場合、 CT_ILGL が返されます。
nthctype は、 string[nbyte] のキャラクタタイプを返します。 nbyte がゼロより小さい、または string の長さを超える場合にも、 CT_ILGL が返されます。
関連事項
ctype(3), jctype(3J), jstring(3J), setlocale(3)
NEWS-OSRelease 4.2.1R