GetNumberFormatA(3w)

GetNumberFormatA3w

Usage

INT GetNumberFormatA
(
LCID lcid,
DWORD dwFlags,
LPCSTR lpszValue,
const NUMBERFMTA* lpFormat,
LPSTR lpNumberStr,
int cchOut
)

Overview

Format a number string for a given locale.

Params

lcid [In] Locale to format for.

dwFlags [In] LOCALE_ flags from "winnls.h".

lpszValue [In] String to format.

lpFormat [In] Formatting overrides.

lpNumberStr [Out] Destination for formatted string.

cchOut [In] Size of lpNumberStr, or 0 to calculate the resulting size.

Notes

- lpszValue can contain only '0' - '9', '-' and '.'.

- If lpFormat is non-NULL, dwFlags must be 0. In this case lpszValue will be formatted according to the format details returned by GetLocaleInfoA(3w).

- This function rounds the number string if the number of decimals exceeds the locales normal number of decimal places.

- If cchOut is 0, this function does not write to lpNumberStr.

- The Ascii version of this function fails if lcid is Unicode only.

Returns

Success: The number of character written to lpNumberStr, or that would have been written, if cchOut is 0.

Failure: 0. Use GetLastError(3w) to determine the cause.

Implementation

Declared in "winnls.h".

Implemented in "dlls/kernel32/lcformat.c".

Debug channel "nls".

Releases

5 releases since Debian 2.1 (Slink); the text changed 4 times.

  1. 2.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.