@jiminp/tooltool
    Preparing search index...

    Function formatSignedInt

    • Formats a number with an explicit sign prefix (+, -, or ± for zero).

      Parameters

      • n: number

        The number to format.

      • Optionalmin_len: number

        Minimum length of the numeric part (pads absolute value).

      • Optionalfill_string: string

        Padding string (default: ' ').

      Returns string

      The formatted string with sign prefix.

      formatSignedInt(42);        // "+42"
      formatSignedInt(-5); // "-5"
      formatSignedInt(0); // "±0"
      formatSignedInt(5, 3, '0'); // "+005"