strtobool(9)
hii bestie!! welcome to the Kernel API Manual page for strtobool(9) π
β¨ this oneβs short, sweet, and literally here to turn common user inputs into boolean values π¦
π NAME π
strtobool β convert common user inputs into boolean values π
β¨ SYNOPSIS β¨
int strtobool (const char *s , bool *res );
π ARGUMENTS π
sβ input string πresβ result π―
πΈ DESCRIPTION πΈ
okay so hereβs the tea: this routine returns 0 iff the first character is one of 'Yy1Nn0', or [oO][NnFf] for "on" and "off". Otherwise it will return -EINVAL. the value pointed to by res is updated upon finding a match π
no match?-EINVALsays hi π match?resgets the update, periodt β¨
π SEE ALSO π
- Kernel file
./tools/lib/string.cπ memdup(9)π§strlcpy(9)πskip_spaces(9)π¦strim(9)πΈstrreplace(9)πmemchr_inv(9)β
mwah π β source/version ./tools/lib, dated October 2026, for strtobool(9). bye bestie, slay your booleans π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms