Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::moneypunct

      From cppreference.com
      <cpp‎ |locale
       
       
       
      Localization library
       
       
      Defined in header<locale>
      template<class CharT,bool International=false>
      class moneypunct;

      The facetstd::moneypunct encapsulates monetary value format preferences. Stream I/O manipulatorsstd::get_money andstd::put_money usestd::moneypunct throughstd::money_get andstd::money_put for parsing monetary value input and formatting monetary value output.

      std-moneypunct-inheritance.svg

      Contents

      [edit]Specializations

      The standard library is guaranteed to provide the following specializations (they arerequired to be implemented by any locale object):

      Defined in header<locale>
      std::moneypunct<char> provides equivalents of the "C" locale preferences
      std::moneypunct<wchar_t> provides wide character equivalents of the "C" locale preferences
      std::moneypunct<char,true> provides equivalents of the "C" locale preferences, with international currency symbols
      std::moneypunct<wchar_t,true> provides wide character equivalents of the "C" locale preferences, with international currency symbols

      [edit]Nested types

      Type Definition
      char_typeCharT
      string_typestd::basic_string<CharT>

      [edit]Data members

      Member Description
      std::locale::idid[static] the identifier of thefacet
      constboolintl[static]International

      [edit]Member functions

      constructs a newmoneypunct facet
      (public member function)[edit]
      invokesdo_decimal_point
      (public member function)[edit]
      invokesdo_thousands_sep
      (public member function)[edit]
      invokesdo_grouping
      (public member function)[edit]
      invokesdo_curr_symbol
      (public member function)[edit]
      invokesdo_positive_sign ordo_negative_sign
      (public member function)[edit]
      invokesdo_frac_digits
      (public member function)[edit]
      invokesdo_pos_format/do_neg_format
      (public member function)[edit]

      [edit]Protected member functions

      destructs amoneypunct facet
      (protected member function)[edit]
      provides the character to use as decimal point
      (virtual protected member function)[edit]
      provides the character to use as thousands separator
      (virtual protected member function)[edit]
      [virtual]
      provides the numbers of digits between each pair of thousands separators
      (virtual protected member function)[edit]
      provides the string to use as the currency identifier
      (virtual protected member function)[edit]
      provides the string to indicate a positive or negative value
      (virtual protected member function)[edit]
      provides the number of digits to display after the decimal point
      (virtual protected member function)[edit]
      provides the formatting pattern for currency values
      (virtual protected member function)[edit]
      [edit]

      Inherited fromstd::money_base

      Nested types

      Type Definition
      enum part{ none, space, symbol, sign, value}; unscoped enumeration type
      struct pattern{char field[4];}; the monetary format type
      Enumeration constant Description
      none whitespace is permitted but not required except in the last position, where whitespace is not permitted
      space one or more whitespace characters are required
      symbol the sequence of characters returned bystd::moneypunct::curr_symbol is required
      sign the first of the characters returned bystd::moneypunct::positive_sign orstd::moneypunct::negative_sign is required
      value the absolute numeric monetary value is required

      [edit]See also

      defines monetary formatting patterns
      (class)[edit]
      represents the system-suppliedstd::moneypunct for the named locale
      (class template)[edit]
      parses and constructs a monetary value from an input character sequence
      (class template)[edit]
      formats a monetary value for output as a character sequence
      (class template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/locale/moneypunct&oldid=178035"

      [8]ページ先頭

      ©2009-2025 Movatter.jp