Files
cppdraft_translate/cppdraft/locale/moneypunct/virtuals.md
2025-10-25 03:02:53 +03:00

4.6 KiB
Raw Blame History

[locale.moneypunct.virtuals]

28 Text processing library [text]

28.3 Localization library [localization]

28.3.4 Standard locale categories [locale.categories]

28.3.4.7 The monetary category [category.monetary]

28.3.4.7.4 Class template moneypunct [locale.moneypunct]

28.3.4.7.4.3 Virtual functions [locale.moneypunct.virtuals]

🔗

charT do_decimal_point() const;

1

#

Returns: The radix separator to use in case do_frac_digits() is greater than zero.231

🔗

charT do_thousands_sep() const;

2

#

Returns: The digit group separator to use in case do_grouping() specifies a digit grouping pattern.232

🔗

string do_grouping() const;

3

#

Returns: A pattern defined identically as, but not necessarily equal to, the result of numpunct::do_grouping().233

🔗

string_type do_curr_symbol() const;

4

#

Returns: A string to use as the currency identifier symbol.

[Note 1:

For specializations where the second template parameter is true, this is typically four characters long: a three-letter code as specified by ISO 4217[bib] followed by a space.

— end note]

🔗

string_type do_positive_sign() const; string_type do_negative_sign() const;

5

#

Returns: do_positive_sign() returns the string to use to indicate a positive monetary value;234do_negative_sign() returns the string to use to indicate a negative value.

🔗

int do_frac_digits() const;

6

#

Returns: The number of digits after the decimal radix separator, if any.235

🔗

pattern do_pos_format() const; pattern do_neg_format() const;

7

#

Returns: The specializations required in Table 92 ([locale.category]), namely

moneypunct,

moneypunct<wchar_t>,

moneypunct<char, true>, and

moneypunct<wchar_t, true>,

return an object of type pattern initialized to { symbol, sign, none, value }.236

231)231)

In common U.S. locales this is '.'.

232)232)

In common U.S. locales this is ','.

233)233)

To specify grouping by 3s, the value is "\003" not "3".

234)234)

This is usually the empty string.

235)235)

In common U.S. locales, this is 2.

236)236)

Note that the international symbol returned by do_curr_symbol() usually contains a space, itself; for example, "USD ".