Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

count_digits_of_base

Function to count the number of digits in a number.

Arguments

  • num - The number to count the digits of.
  • base - Base in which to count the digits.

Returns

  • u32 - The number of digits in num of base

Fully qualified path: alexandria_math::count_digits_of_base

pub fn count_digits_of_base(mut num: u128, base: u128) -> u32