(suffix: string, str: string)
| 26 | * @category String |
| 27 | */ |
| 28 | export function ensureSuffix(suffix: string, str: string) { |
| 29 | if (!str.endsWith(suffix)) |
| 30 | return str + suffix |
| 31 | return str |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Dead simple template engine, just like Python's `.format()` |