CHKCTYPE(3J) — UNIX 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/∗ ASCIIキャラクタおよび他の 8 ビットコード ∗/
#define CT_KJ11/∗ 2バイトコードの 1番目のバイト ∗/
#define CT_KJ22/∗ 2バイトコードの 2番目のバイト ∗/
#define CT_ILGL−1/∗ 不当なキャラクタコード ∗/
c がナルである場合には、CT_ILGL が返されます。
Nthctype は、string[nbyte] のキャラクタタイプを返します。
nbyte が string の長さを超える場合には、CT_ILGL が返されます。
また、nbyte がゼロまたはそれより小さい場合にも、CT_ILGL が返されます。
関連事項
ctype(3), jctype(3J), jstring(3J), set_syscode(3J)
NEWS-OSRelease 3.3