ocean.text.util.DigitGrouping

Functions for generating thousands separated string representations of a number.

Usage:

import ocean.text.util.DigitGrouping;

// Number to convert
const number = 12345678;

// Generating a thousands separated string.
char[] number_as_string;
DigitGrouping.format(number, number_as_string);

// Checking how many characters would be required for a thousands
// separated number.
cont max_len = 10;
assert(DigitGrouping.length(number) <= max_len);

Members

Classes

BitGrouping
class BitGrouping

Binary digit grouping class -- just a container for static functions.

DigitGrouping
class DigitGrouping

Digit grouping class -- just a container for static functions.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).