---
name: "strtol_l"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/strtol_l"
---

# strtol\_l(3)

convert a string value to a long, long long, intmax\_t, quad\_t unsigned long, unsigned long long, uintmax\_t, or u\_quad\_t integer

## NAME

**strtol\_l**, **strtoll\_l**, **strtoimax\_l**, **strtoq\_l**, **strtoul\_l**, **strtoull\_l**, **strtoumax\_l**, **strtouq\_l** – convert a string value to a *long*, *long long*, *intmax\_t*, *quad\_t* *unsigned long*, *unsigned long long*, *uintmax\_t*, or *u\_quad\_t* integer

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<stdlib.h\>**

**#include \<limits.h\>**

**#include \<xlocale.h\>**

*long*\

**strtol\_l**(*const char \* restrict nptr*, *char \*\* restrict endptr*, *int base*, *locale\_t loc*);

*long* *long*\

**strtoll\_l**(*const char \* restrict nptr*, *char \*\* restrict endptr*, *int base*, *locale\_t loc*);

*unsigned long*\

**strtoul\_l**(*const char \* restrict nptr*, *char \*\* restrict endptr*, *int base*, *locale\_t loc*);

*unsigned long long*\

**strtoull\_l**(*const char \* restrict nptr*, *char \*\* restrict endptr*, *int base*, *locale\_t loc*);

**#include \<inttypes.h\>**

**#include \<xlocale.h\>**

*intmax\_t*\

**strtoimax\_l**(*const char \* restrict nptr*, *char \*\* restrict endptr*, *int base*, *locale\_t loc*);

*uintmax\_t*\

**strtoumax\_l**(*const char \* restrict nptr*, *char \*\* restrict endptr*, *int base*, *locale\_t loc*);

**#include \<sys/types.h\>**

**#include \<stdlib.h\>**

**#include \<limits.h\>**

**#include \<xlocale.h\>**

*quad\_t*\

**strtoq\_l**(*const char \*nptr*, *char \*\*endptr*, *int base*, *locale\_t loc*);

*u\_quad\_t*\

**strtouq\_l**(*const char \*nptr*, *char \*\*endptr*, *int base*, *locale\_t loc*);

## DESCRIPTION

The **strtol\_l**(), **strtoll\_l**(), **strtoimax\_l**(), **strtoq\_l**(), **strtoul\_l**(), **strtoull\_l**(), **strtoumax\_l**(), and **strtouq\_l**() functions are extended locale versions of the **strtol**(), **strtoll**(), **strtoimax**(), **strtoq**(), **strtoul**(), **strtoull**(), **strtoumax**(), and **strtouq**() functions, respectively. Refer to their manual pages for details. Also, see [xlocale(3)](/xlocale/3.md) for more information about extended locales.

## SEE ALSO

[strtol(3)](/strtol/3.md), [strtoul(3)](/strtoul/3.md), [xlocale(3)](/xlocale/3.md)
