UNPKG

@accounter/server

Version:
10 lines (9 loc) 480 B
/** * Pads or trims a string to match a specified length. * @param value - The input string to process * @param length - The target length * @param padChar - Character used for padding (default: '0') * @param alignRight - If true, right-aligns by padding left; otherwise left-aligns (default: true) * @returns The padded or trimmed string of exact length */ export declare const padOrTrim: (value: string, length: number, padChar?: string, alignRight?: boolean) => string;