@technobuddha > library > String > Construction
Function: ensureSuffix()
ts
function ensureSuffix(input: string, suffix: string): string;Defined in: ensure-suffix.ts:9
Add a suffix to a string, if it does not already have the suffix
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string |
suffix | string | The suffix |
Returns
string
The string followed by the suffix