Function getFormattedNumber

  • Prints the provided number to a format specifyable by the parameters

    Parameters

    • number: number
    • digits: number

      fills 0 digits to the left, is printed length of the number is below the digit count

    • Optional crop: number

      crops the printed number to the specified length from the left, i.e. the most significant digits will remain

    • Optional zero: boolean

      if set, removes all zero digits from the left.

    Returns string