localeconv.3c (2010 09)

l
localeconv(3C) localeconv(3C)
NAME
localeconv() - query the numeric formatting conventions of the current locale
SYNOPSIS
#include <locale.h>
struct lconv *localeconv(void);
DESCRIPTION
The localeconv() function sets the components of an object of type
struct lconv (defined in
<locale.h>) with values appropriate for the formatting of numeric quantities (monetary and other-
wise) according to the rules of the program’s current locale (see setlocale (3C)).
The members of the structure with type
char * are strings, any of which (except decimal_point
) can
point to "" (the empty string) to indicate that the value is not available in the current locale or is of zero
length. The members with type
char are non-negative numbers, any of which can be
CHAR_MAX
(defined in <limits.h>) to indicate that the value is not available in the current locale. The members
include the following:
char *decimal_point
The decimal point character used to format nonmonetary quantities. This is the same
value as that returned by a call to nl_langinfo()
with RADIXCHAR as its argument
(see nl_langinfo (3C)).
char *thousands_sep
The character used to separate groups of digits to the left of the decimal point character
in formatted nonmonetary quantities. This is the same value as that returned by a call to
nl_langinfo() with THOUSEP as its argument (see nl_langinfo (3C)).
char *grouping
A string where the numeric value of each byte indicates the size of each group of digits in
formatted nonmonetary quantities.
char *int_curr_symbol
The international currency symbol applicable to the current locale. The first three char-
acters contain the alphabetic international currency symbol in accordance with those
specified in ISO 4217 Codes for the Representation of Currency and Funds. The fourth
character (immediately preceding the null character) is the character used to separate
the international currency symbol from the monetary quantity.
char *currency_symbol
The local currency symbol applicable to the current locale. This value along with posi-
tioning information is returned by a call to
nl_langinfo()
with CRNCYSTR as its
argument (see nl_langinfo (3C)).
char *mon_decimal_point
The decimal point used to format monetary quantities.
char *mon_thousands_sep
The separator for groups of digits to the left of the decimal point in formatted monetary
quantities.
char *mon_grouping
A string where the numeric value of each byte indicates the size of each group of digits in
formatted monetary quantities.
char *positive_sign
The string used to indicate a positive valued formatted monetary quantity.
char *negative_sign
The string used to indicate a negative valued formatted monetary quantity.
char int_frac_digits
The number of fractional digits (those to the right of the decimal point) to be displayed in
an internationally formatted monetary quantity.
char frac_digits
The number of fractional digits (those to the right of the decimal point) to be displayed in
a locally formatted monetary quantity.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)