minishell
ft_is.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CHAR_HTAB   '\t'
 
#define CHAR_LF   '\n'
 
#define CHAR_VTAB   '\v'
 
#define CHAR_FF   '\f'
 
#define CHAR_CR   '\r'
 
#define CHAR_WS   ' '
 

Functions

int ft_isalpha (int c)
 
int ft_isdigit (int c)
 
int ft_isalnum (int c)
 
int ft_isascii (int c)
 
int ft_isprint (int c)
 
int ft_islower (int c)
 
int ft_isupper (int c)
 
int ft_isspace (int c)
 
int ft_isspcornil (int c)
 

Macro Definition Documentation

◆ CHAR_CR

#define CHAR_CR   '\r'

Definition at line 20 of file ft_is.h.

◆ CHAR_FF

#define CHAR_FF   '\f'

Definition at line 19 of file ft_is.h.

◆ CHAR_HTAB

#define CHAR_HTAB   '\t'

Definition at line 16 of file ft_is.h.

◆ CHAR_LF

#define CHAR_LF   '\n'

Definition at line 17 of file ft_is.h.

◆ CHAR_VTAB

#define CHAR_VTAB   '\v'

Definition at line 18 of file ft_is.h.

◆ CHAR_WS

#define CHAR_WS   ' '

Definition at line 21 of file ft_is.h.

Function Documentation

◆ ft_isalnum()

int ft_isalnum ( int  c)

Definition at line 15 of file ft_isalnum.c.

16 {
17  return (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')
18  || ('0' <= c && c <= '9'));
19 }
Here is the caller graph for this function:

◆ ft_isalpha()

int ft_isalpha ( int  c)

Definition at line 15 of file ft_isalpha.c.

16 {
17  return (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'));
18 }
Here is the caller graph for this function:

◆ ft_isascii()

int ft_isascii ( int  c)

Definition at line 15 of file ft_isascii.c.

16 {
17  return (0x00 <= c && c <= 0x7F);
18 }

◆ ft_isdigit()

int ft_isdigit ( int  c)

Definition at line 15 of file ft_isdigit.c.

16 {
17  return ('0' <= c && c <= '9');
18 }
Here is the caller graph for this function:

◆ ft_islower()

int ft_islower ( int  c)

Definition at line 15 of file ft_islower.c.

16 {
17  return ('a' <= c && c <= 'z');
18 }
Here is the caller graph for this function:

◆ ft_isprint()

int ft_isprint ( int  c)

Definition at line 15 of file ft_isprint.c.

16 {
17  return (0x20 <= c && c <= 0x7E);
18 }

◆ ft_isspace()

int ft_isspace ( int  c)

Definition at line 15 of file ft_isspace.c.

16 {
17  unsigned char uc;
18 
19  uc = (unsigned char)c;
20  return (
21  uc == CHAR_HTAB
22  || uc == CHAR_LF
23  || uc == CHAR_VTAB
24  || uc == CHAR_FF
25  || uc == CHAR_CR
26  || uc == CHAR_WS
27  );
28 }
#define CHAR_HTAB
Definition: ft_is.h:16
#define CHAR_WS
Definition: ft_is.h:21
#define CHAR_CR
Definition: ft_is.h:20
#define CHAR_LF
Definition: ft_is.h:17
#define CHAR_FF
Definition: ft_is.h:19
#define CHAR_VTAB
Definition: ft_is.h:18
Here is the caller graph for this function:

◆ ft_isspcornil()

int ft_isspcornil ( int  c)

Definition at line 30 of file ft_isspace.c.

31 {
32  unsigned char uc;
33 
34  uc = (unsigned char)c;
35  return (
36  uc == '\0'
37  || ft_isspace(c)
38  );
39 }
int ft_isspace(int c)
Definition: ft_isspace.c:15
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ft_isupper()

int ft_isupper ( int  c)

Definition at line 15 of file ft_isupper.c.

16 {
17  return ('A' <= c && c <= 'Z');
18 }
Here is the caller graph for this function: