A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../../cpp/../cpp/locale/moneypunct/positive_sign.html below:

std::moneypunct<CharT,International>::positive_sign, do_positive_sign, negative_sign, do_negative_sign - cppreference.com

public:
string_type positive_sign() const;

(1)

public:
string_type negative_sign() const;

(2)

protected:
virtual string_type do_positive_sign() const;

(3)

protected:
virtual string_type do_negative_sign() const;

(4)

1) Public member function, calls the member function do_positive_sign of the most derived class.

2) Public member function, calls the member function do_negative_sign of the most derived class.

3) Returns the string that is used for formatting of positive monetary values.

3) Returns the string that is used for formatting of negative monetary values.

Only the first character of the string returned is the character that appears in the pos_format()/neg_format() position indicated by the value sign. The rest of the characters appear after the rest of the monetary string.

In particular, for negative_sign of "-", the formatting may appear as "-1.23 €", while for negative_sign of "()" it would appear as "(1.23 €)".

[edit] Return value

The string of type string_type holding the characters to be used as positive or negative sign.

[edit] Example

Output:

de_DE.utf8 negative sign is '-' for example: -12,34 €
ms_MY.utf8 negative sign is '()' for example: (RM12.34)
de_DE.utf8 with negative_sign set to "()": (12,34 €)
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4