std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign (3) - Linux Manuals
std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign: std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign
NAME
std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign - std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign
Synopsis
Defined in header <locale>
public: (1)
string_type positive_sign() const;
public: (2)
string_type negative_sign() const;
protected: (3)
virtual string_type do_positive_sign() const;
protected: (4)
virtual string_type do_negative_sign() const;
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 €)".
Return value
The string of type string_type holding the characters to be used as positive or negative sign.
Example
// Run this code
Output:
See also
do_pos_format provides the formatting pattern for currency values
do_neg_format (virtual protected member function)
[virtual]