strtobool(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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? -EINVAL says hi 😭 match? res gets the update, periodt ✨

🌈 SEE ALSO 🌈


mwah πŸ’‹ β€” source/version ./tools/lib, dated October 2026, for strtobool(9). bye bestie, slay your booleans πŸ«ΆπŸ’…

πŸ“¦ where this page comes from