library-ts/browser/text/TextTool.ts

14 lines
251 B
TypeScript
Raw Normal View History

2025-11-10 17:41:48 +00:00
export class TextTool
{
static prependZeros( anySource:string|number, minimumLength:number = 2 )
{
let source = anySource + "";
while ( source.length < minimumLength )
{
source = "0" + source;
}
return source;
}
}