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 the following constants:
#define CT_ASC 0/∗ ASCII character and the other 1-byte-code ∗/
#define CT_KJ1 1/∗ the first byte of 2-byte-code ∗/
#define CT_KJ2 2/∗ the second byte of 2-byte-code ∗/
#define CT_ILGL −1/∗ illegal character code ∗/
Nthctype returns a character type of string[nbyte].
If nbyte exceeds the length of string, this function returns
CT_ILGL; if nbyte is negative, it also returns CT_ILGL.
SEE ALSO
ctype(3), jctype(3J), jstring(3J), setlocale(3)
NEWS-OSRelease 4.1C