Character classification functions 字元分類函數
They check whether the character passed as parameter belongs to a certain category:
| Function | Description |
|---|---|
| isalnum() | 字元是否為字母或數字 |
| isalpha() | 字元是否為字母 |
| isblank() | 字元是否為白空白 |
| iscntrl() | 字元是否為控制字元 |
| isdigit() | 字元是否為數字 |
| isgraph() | 字元是否有形狀 |
| islower() | 字元是否為小寫字母 |
| isprint() | 字元是否為可列印 (isgraph() + 空白) |
| ispunct() | 字元是否為標點符號 (isgraph() - 字母 - 數字) |
| isspace() | 字元是否為空白 / Tab |
| isupper() | 字元是否為大寫字母 |
| isxdigit() | 字元是否為 16 進位數字 |
Character conversion functions 字元轉換函數
Two functions that convert between letter cases:
| Function | Description |
|---|---|
| tolower() | 將大寫轉成小寫 |
| toupper() | 將小寫轉成大寫 |