Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dallmo_util_array/etc/deps.ts>dallmo_util_math.add_leading_zero

deno module, a collection of array util under dallmo-util
Latest
function dallmo_util_math.add_leading_zero
import { dallmo_util_math } from "https://deno.land/x/dallmo_util_array@v1.3.0/etc/deps.ts";
const { add_leading_zero } = dallmo_util_math;

given a number, return a string with leading zero in specified output_length by char count

Parameters

input_num: number
  • the input number
output_length: number
  • the total length in char

Returns

string