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

# wcstod(3)

convert string to float, double, or long double

## NAME

**wcstod**, **wcstof**, **wcstold** – convert string to *float*, *double*, or *long double*

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

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

*double*\

**wcstod**(*const wchar\_t \*restrict nptr*, *wchar\_t \*\*restrict endptr*);

*float*\

**wcstof**(*const wchar\_t \*restrict nptr*, *wchar\_t \*\*restrict endptr*);

*long double*\

**wcstold**(*const wchar\_t \*restrict nptr*, *wchar\_t \*\*restrict endptr*);

## DESCRIPTION

The **wcstof**(), **wcstod**(), and **wcstold**() functions are the wide-character versions of the **strtof**(), **strtod**(), and **strtold**() functions. Refer to [strtod(3)](/strtod/3.md) for details.

Extended locale versions of these functions are documented in [wcstod\_l(3)](/wcstod_l/3.md). See [xlocale(3)](/xlocale/3.md) for more information.

## SEE ALSO

[strtod(3)](/strtod/3.md), [wcstod\_l(3)](/wcstod_l/3.md), [wcstol(3)](/wcstol/3.md)

## STANDARDS

The **wcstof**(), **wcstod**() and **wcstold**() functions conform to ISO/IEC 9899:1999 (“ISO C99”).
