1STRTOBOOL(9) Basic C Library Functions STRTOBOOL(9)
23
4
NAME
6strtobool - convert common user inputs into boolean values
7
SYNOPSIS
9int strtobool(const char * s, bool * res);
10
ARGUMENTS
12s
13input string
1415
res
16result
17
DESCRIPTION
19This routine returns 0 iff the first character is one of ´Yy1Nn0´.
20Otherwise it will return -EINVAL. Value pointed to by res is updated
21upon finding a match.
22
COPYRIGHT
24Kernel Hackers Manual 2.6. June 2019 STRTOBOOL(9)