1STRICT_STRTOL(9) Basic C Library Functions STRICT_STRTOL(9)
2
3
4
6 strict_strtol - convert a string to a long strictly
7
9 int strict_strtol(const char * cp, unsigned int base, long * res);
10
12 cp
13 The string to be converted
14
15 base
16 The number base to use
17
18 res
19 The converted result value
20
22 strict_strtol is similiar to strict_strtoul, but it allows the first
23 character of a string is '-'.
24
25 It returns 0 if conversion is successful and *res is set to the
26 converted value, otherwise it returns -EINVAL and *res is set to 0.
27
29Kernel Hackers Manual 2.6. November 2011 STRICT_STRTOL(9)