CHKCTYPE(3J) — NEWS-OS Programmer’s Manual
NAME
chkctype, nthctype − character classification in string
SYNOPSIS
#include <jctype.h>
int chkctype(c, prev_ctype)
char c;
int prev_ctype;
int nthctype(string, nbyte)
char ∗string;
int nbyte;
DESCRIPTION
chkctype retruns a character type of c according to prev_ctype indicating a type of character just before c. Character types for prev_ctype and the return value may be one of he following constants:
#define CT_ASC0/∗ 1-byte-code (ASCII character) ∗/
#define CT_KJ11/∗ the first byte of 2-byte-code ∗/
#define CT_KJ22/∗ the second byte of 2-byte-code ∗/
#define CT_ILGL−1 /∗ illegal character code ∗/
If c is a null character or is invalid for the second byte of 2-byte-code, this function returns CT_ILGL.
nthctype returns a character type of string[nbyte]. If nbyte is negative or exceeds the length of string, this function also returns CT_ILGL.
SEE ALSO
ctype(3), jctype(3J), jstring(3J), setlocale(3)
NEWS-OSRelease 4.2.1R