---
name: "strtobool"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/strtobool"
---

# strtobool(9)

convert 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

This routine returns 0 iff the first character is one of 'Yy1Nn0'. Otherwise it will return -EINVAL. Value pointed to by res is updated upon finding a match.

## COPYRIGHT
