The sequence is returned as a string (basic_string<char>) where each char element shall be interpreted as an integer value indicating the number of digits in each group. Grouping is considered from right to left, with the first character in the string being used for the rightmost group, and the last character used for any group farther away than the length of the string.
For example, "\03" indicates groups of three digits each, while "\02\03" would indicate that the rightmost group has two digits and all the remaining ones have three digits each.
A negative value in the string or a value equal to CHAR_MAX indicates that the number of digits in the group is unlimited.
For the standard specializations of char and wchar_t the function returns an empty string, indicating no grouping.
During its operation, the version of this function in the generic template simply calls the virtual protected member do_grouping, which is the member function in charge of performing the actions described above.
Return valueA string object containing a sequence of digit grouping values.
Notice that this is an object of type basic_string<char> no matter what character type is used as template parameter.
|numpunct::decimal_point||Return decimal point character (public member function)|
|moneypunct::grouping||Return grouping of digits (public member function)|