Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ is2byte(3) — NEWS-os 3.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ascii(7)

jctype(3J)

jstring(3J)

set_syscode(3J)

CTYPE(3)  —  UNIX Programmer’s Manual

NAME

isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii, iskanji, iskanji2, iskana, iskana2, iskpun, iskmoji, is2byte, iseuc, iseuckana, issjis1, issjis2, isjis, toupper, tolower, toascii  − character classification macros

SYNOPSIS

#include <ctype.h>

isalpha(c)

. . . 

DESCRIPTION

These macros classify charcate-coded integer values by table lookup.  In addition, Kanji and Kana code predicates are added.  All return nonzero for true, zero for false. 

Isascii is defined on all integer values and the other macros are defined on unsigned char values. 

The return values of iskanji, iskanji2, iskana, and is2byte depend on the kanji mode(sjis/euc) set by set_syscode(3J) function.

isalpha c is a letter

isupper c is an upper case letter

islower c is a lower case letter

isdigit c is a digit

isxdigit c is a hexadecimal digit

isalnum c is an alphanumeric character

isspace c is a space, tab, carriage return, newline, or formfeed

ispunct c is a punctuation character (neither control nor alphanumeric)

isprint c is a printing character, code 0x20 (space) through 0x7e (tilde)

isgraph c is a graphic character, code 0x21 (exclamation) through 0x7e (tilde)

iscntrl c is a delete character (0x7f) or ordinary control character (less than 0x20)

isascii c is an ASCII character, code less than 0x80

iskanji c is the first byte of a kanji character. 
In Shift-JIS mode, 0x81 ≤ c ≤ 0x9f or 0xe0 ≤ c ≤ 0xfc. 
In EUC mode, 0xa1 ≤ c ≤ 0xfe. 

iskanji2 c is the second byte of a kanji character. 
In Shift-JIS mode, 0x40 ≤ c ≤ 0xfc and c != 0x7f. 
In EUC mode, 0xa1 ≤ c ≤ 0xfe. 

iskana c is a hankaku-kana (0xa1 ≤ c ≤ 0xdf) in Shift-JIS mode,
c is the first byte of a hankaku-kana in EUC mode. Single shift 2 (0x8e)

iskana2 c is a hankaku-kana (0xa1 ≤ c ≤ 0xdf)

iskpun c is a hankaku-kana punctuation (0xa1 ≤ c ≤ 0xa5)

iskmoji c is just a hankaku-kana-moji (0xa6 ≤ c ≤ 0xdf)

is2byte c is the first byte of a 2-byte-code. 
In Shift-JIS mode, 0x81 ≤ c ≤ 0x9f or 0xe0 ≤ c ≤ 0xfc. 
In EUC mode, 0xa1 ≤ c ≤ 0xfe or c == 0x8e. 

iseuc c is a code of a kanji character of EUC code (0xa1 ≤ c ≤ 0xfe)

iseuckana c is the first byte of a hankaku-kana of EUC code. Single shift 2 (0x8e)

issjis1 c is the first byte of a kanji character of Shift-JIS code (0x81 ≤ c ≤ 0x9f or 0xe0 ≤ c ≤ 0xfc)

issjis2 c is the second byte of a kanji character of Shift-JIS code (0x40 ≤ c ≤ 0xfc and c != 0x7f)

isjis c is a code of a kanji character of JIS code (0x21 ≤ c ≤ 0x7e)

toascii c is converted to be a valid ascii character. 

tolower c is converted to lower case.  Return value is undefined if not isupper(c).

toupper c is converted to upper case.  Return value is undefined if not islower(c).

SEE ALSO

ascii(7), jctype(3J), jstring(3J), set_syscode(3J)

NEWS-OSRelease 3.3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026