Files
personal_site/frontend/node_modules/@aws-cdk/toolkit-lib/lib/util/string-manipulation.d.ts
T

24 lines
1.0 KiB
TypeScript

/**
* Pad 's' on the left with 'char' until it is n characters wide
*/
export declare function padLeft(n: number, x: string, char?: string): string;
/**
* Pad 's' on the right with 'char' until it is n characters wide
*/
export declare function padRight(n: number, x: string, char?: string): string;
/**
* Formats time in milliseconds (which we get from 'Date.getTime()')
* to a human-readable time; returns time in seconds rounded to 2
* decimal places.
*/
export declare function formatTime(num: number): number;
/**
* This function lower cases the first character of the string provided.
*/
export declare function lowerCaseFirstCharacter(str: string): string;
/**
* Returns the provided reason or a default fallback message if the reason is undefined, null, or empty.
* This is commonly used for AWS API responses that may not always provide a reason field.
*/
export declare function formatReason(reason: string | undefined | null, fallback?: string): string;
//# sourceMappingURL=string-manipulation.d.ts.map