Base module

numeric

Integer parsing and formatting helpers.

numeric

Integer parsing and formatting helpers.

Functions

ReturnNameDescription
voidformatFormats an integer value in decimal notation.
voidformatFormats an integer value in decimal notation, right justified in a field having at least the specified width.
voidformat0Formats an integer value in decimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatHexFormats an int value in hexadecimal notation. The value is treated as unsigned.
voidformatHexFormats an int value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width. The value is treated as unsigned.
voidformatFormats an unsigned int value in decimal notation.
voidformatFormats an unsigned int value in decimal notation, right justified in a field having at least the specified width.
voidformat0Formats an unsigned int value in decimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatHexFormats an unsigned int value in hexadecimal notation.
voidformatHexFormats an unsigned int value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatFormats a long value in decimal notation.
voidformatFormats a long value in decimal notation, right justified in a field having at least the specified width.
voidformat0Formats a long value in decimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatHexFormats a long value in hexadecimal notation. The value is treated as unsigned.
voidformatHexFormats a long value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width. The value is treated as unsigned.
voidformatFormats an unsigned long value in decimal notation.
voidformatFormats an unsigned long value in decimal notation, right justified in a field having at least the specified width.
voidformat0Formats an unsigned long value in decimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatHexFormats an unsigned long value in hexadecimal notation.
voidformatHexFormats an unsigned long value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatFormats a 64-bit integer value in decimal notation.
voidformatFormats a 64-bit integer value in decimal notation, right justified in a field having at least the specified width.
voidformat0Formats a 64-bit integer value in decimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatHexFormats a 64-bit integer value in hexadecimal notation. The value is treated as unsigned.
voidformatHexFormats a 64-bit integer value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width. The value is treated as unsigned.
voidformatFormats an unsigned 64-bit integer value in decimal notation.
voidformatFormats an unsigned 64-bit integer value in decimal notation, right justified in a field having at least the specified width.
voidformat0Formats an unsigned 64-bit integer value in decimal notation, right justified and zero-padded in a field having at least the specified width.
voidformatHexFormats an unsigned 64-bit integer value in hexadecimal notation.
voidformatHexFormats an unsigned 64-bit integer value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width.

format

void format(std::string & str, int value)

Formats an integer value in decimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


format

void format(std::string & str, int value, int width)

Formats an integer value in decimal notation, right justified in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with spaces on the left.


format0

void format0(std::string & str, int value, int width)

Formats an integer value in decimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


formatHex

void formatHex(std::string & str, int value)

Formats an int value in hexadecimal notation. The value is treated as unsigned.

Parameters

  • str Output string to append to.

  • value Value to format.


formatHex

void formatHex(std::string & str, int value, int width)

Formats an int value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width. The value is treated as unsigned.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


format

void format(std::string & str, unsigned value)

Formats an unsigned int value in decimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


format

void format(std::string & str, unsigned value, int width)

Formats an unsigned int value in decimal notation, right justified in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with spaces on the left.


format0

void format0(std::string & str, unsigned int value, int width)

Formats an unsigned int value in decimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


formatHex

void formatHex(std::string & str, unsigned value)

Formats an unsigned int value in hexadecimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


formatHex

void formatHex(std::string & str, unsigned value, int width)

Formats an unsigned int value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


format

void format(std::string & str, long value)

Formats a long value in decimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


format

void format(std::string & str, long value, int width)

Formats a long value in decimal notation, right justified in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with spaces on the left.


format0

void format0(std::string & str, long value, int width)

Formats a long value in decimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


formatHex

void formatHex(std::string & str, long value)

Formats a long value in hexadecimal notation. The value is treated as unsigned.

Parameters

  • str Output string to append to.

  • value Value to format.


formatHex

void formatHex(std::string & str, long value, int width)

Formats a long value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width. The value is treated as unsigned.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


format

void format(std::string & str, unsigned long value)

Formats an unsigned long value in decimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


format

void format(std::string & str, unsigned long value, int width)

Formats an unsigned long value in decimal notation, right justified in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with spaces on the left.


format0

void format0(std::string & str, unsigned long value, int width)

Formats an unsigned long value in decimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


formatHex

void formatHex(std::string & str, unsigned long value)

Formats an unsigned long value in hexadecimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


formatHex

void formatHex(std::string & str, unsigned long value, int width)

Formats an unsigned long value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


format

void format(std::string & str, std::int64_t value)

Formats a 64-bit integer value in decimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


format

void format(std::string & str, std::int64_t value, int width)

Formats a 64-bit integer value in decimal notation, right justified in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with spaces on the left.


format0

void format0(std::string & str, std::int64_t value, int width)

Formats a 64-bit integer value in decimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


formatHex

void formatHex(std::string & str, std::int64_t value)

Formats a 64-bit integer value in hexadecimal notation. The value is treated as unsigned.

Parameters

  • str Output string to append to.

  • value Value to format.


formatHex

void formatHex(std::string & str, std::int64_t value, int width)

Formats a 64-bit integer value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width. The value is treated as unsigned.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


format

void format(std::string & str, uint64_t value)

Formats an unsigned 64-bit integer value in decimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


format

void format(std::string & str, uint64_t value, int width)

Formats an unsigned 64-bit integer value in decimal notation, right justified in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with spaces on the left.


format0

void format0(std::string & str, uint64_t value, int width)

Formats an unsigned 64-bit integer value in decimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.


formatHex

void formatHex(std::string & str, uint64_t value)

Formats an unsigned 64-bit integer value in hexadecimal notation.

Parameters

  • str Output string to append to.

  • value Value to format.


formatHex

void formatHex(std::string & str, uint64_t value, int width)

Formats an unsigned 64-bit integer value in hexadecimal notation, right justified and zero-padded in a field having at least the specified width.

Parameters

  • str Output string to append to.

  • value Value to format.

  • width Minimum field width; padded with zeros on the left.