-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctype.hpp
More file actions
43 lines (35 loc) · 999 Bytes
/
Copy pathctype.hpp
File metadata and controls
43 lines (35 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#ifndef LIBFTPP_CTYPE_HPP
# define LIBFTPP_CTYPE_HPP
/** @file
* Wrapper functions for standard `ctype` functions that avoid undefined
* behavior.
*
* The behavior of the standard `ctype` functions is undefined if their
* arguments' values are neither representable as `unsigned char` nor equal to
* `EOF`.
* To avoid that, the arguments get cast to `unsigned char` before being passed
* to the standard functions.
*
* The argument and return types are also changed to indicate more clearly what
* values they support.
*/
namespace ft {
/* Character classification */
bool isalnum(char ch);
bool isalpha(char ch);
bool islower(char ch);
bool isupper(char ch);
bool isdigit(char ch);
bool isxdigit(char ch);
bool iscntrl(char ch);
bool isgraph(char ch);
bool isspace(char ch);
bool isblank(char ch);
bool isprint(char ch);
bool ispunct(char ch);
/* Character manipulation */
char tolower(char ch);
char toupper(char ch);
} // namespace ft
#endif // LIBFTPP_CTYPE_HPP