diff --git a/doc/complex.md b/doc/complex.md new file mode 100644 index 0000000..1ce3ab1 --- /dev/null +++ b/doc/complex.md @@ -0,0 +1,4 @@ + +# complex.h - complex number support + +Not supported/implemented diff --git a/doc/ctype.md b/doc/ctype.md new file mode 100644 index 0000000..a264719 --- /dev/null +++ b/doc/ctype.md @@ -0,0 +1,252 @@ + +# ctype.h - Classification of ASCII characters + +Function declarations: + +- [isalnum](#isalnum) +- [isalpha](#isalpha) +- [isblank](#isblank) +- [iscntrl](#iscntrl) +- [isdigit](#isdigit) +- [isgraph](#isgraph) +- [islower](#islower) +- [isprint](#isprint) +- [ispunct](#ispunct) +- [isspace](#isspace) +- [isupper](#isupper) +- [isxdigit](#isxdigit) +- [tolower](#tolower) +- [toupper](#toupper) + +## [isalnum](#isalnum) + +
Description + +Function checks whether given integer is an ASCII code representing a letter or +a digit. These characters are lowercase letters ('a'..'z'), uppercase letters +('A'..'Z') and digits ('0'..'9'). + +
+ +
Declaration + +```c +int isalnum(int c); +``` + +
+ +## [isalpha](#isalpha) + +
Description + +Function checks whether given integer is an ASCII code representing a letter. +These characters are lowercase letters ('a'..'z') and uppercase letters. + +
+ +
Declaration + +```c +int isalpha(int c); +``` + +
+ +## [isblank](#isblank) + +
Description + +Checks whether a character is a space (' ') or a horizontal tab ('\t') + +
+ +
Declaration + +```c +int isblank(int c); +``` + +
+ +## [iscntrl](#iscntrl) + +
Description + +Checks whether a character is a control character +('\x00' through '\x1f' and '\x7f'). + +
+ +
Declaration + +```c +int iscntrl(int c); +``` + +
+ +## [isdigit](#isdigit) + +
Description + +Checks whether a character is a digit ('0' through '9') + +
+ +
Declaration + +```c +int isdigit(int c); +``` +
+ +## [isxdigit](#isxdigit) + +
Description + +Checks whether a character is a hexadecimal digit ('0' through '9', 'a' through 'f' or 'A' through 'F') + +
+ +
Declaration + +```c +int isxdigit(int c); +``` +
+ +## [isgraph](#isgraph) + +
Description + +Checks whether a character is a + +- Number; +- Letter; +- or punctuation + +
+ +
Declaration + +```c +int isgraph(int c); +``` +
+ +## [islower](#islower) + +
Description + +Checks whether a character is a lowercase letter ('a' through 'z') + +
+ +
Declaration + +```c +int islower(int c); +``` +
+ +## [isupper](#isupper) + +
Description + +Checks whether a character is a uppercase letter ('A' through 'Z') + +
+ +
Declaration + +```c +int islower(int c); +``` +
+ +## [isprint](#isprint) + +
Description + +Checks whether a character is a + +- Number; +- Letter; +- Space; +- or punctuation + +
+ +
Declaration + +```c +int isprint(int c); +``` +
+ +## [ispunct](#ispunct) + +
Description + +Checks whether a character is a punctuation character (one of `!"#$%&'()*+,-./:;<=>?@[\]^_{|}~` +or backtick). + +
+ +
Declaration + +```c +int ispunct(int c); +``` +
+ +## [isspace](#isspace) + +
Description + +Function checks whether given integer is a whitespace character. These +characters include whitespace (' '), form feed ('\f'), line feed ('\n'), +carriage return ('\r'), horizontal and vertical tab ('\t' and '\v'). + +
+ +
Declaration + +```c +int isspace(int c); +``` + +
+ +## [tolower](#tolower) + +
Description + +If the character is an uppercase letter returns lowercase version of it. Otherwise +returns the character unmodified. + +
+ +
Declaration + +```c +int tolower(int c); +``` +
+ +## [toupper](#toupper) + +
Description + +If the character is an lowercase letter returns uppercase version of it. Otherwise +returns the character unmodified. + +
+ +
Declaration + +```c +int toupper(int c); +``` +
diff --git a/doc/readme.md b/doc/readme.md index 269000d..0a76323 100644 --- a/doc/readme.md +++ b/doc/readme.md @@ -42,3 +42,8 @@ The headers that are provided have documentation included: - [uchar.h](uchar.md) - [wchar.h](wchar.md) - [wctype.h](wctype.md) + +## Locales + +Not supported. The `char *` strings are assumed to be encoded using ASCII/UTF-8 +encoding.