lexical_util

Module digit

Source
Expand description

Utilities to process digits.

This both contains routines to convert to and from digits, as well as iterate over digits while skipping digit separators.

Functions§

  • Determine if a character is a digit.
  • Determine if a character is a digit with a radix known at compile time.
  • Convert a character to a digit.
  • Convert a character to a digit with a radix known at compile time.
  • Unchecked, highly optimized algorithm to convert a char to a digit. This only works if the input character is known to be a valid digit.
  • Convert a digit to a character. This uses a pre-computed table to avoid branching.
  • Convert a digit to a character with a radix known at compile time.