(str, suffix)
| 2281 | } |
| 2282 | ts.endsWith = endsWith; |
| 2283 | function removeSuffix(str, suffix) { |
| 2284 | return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str; |
| 2285 | } |
| 2286 | ts.removeSuffix = removeSuffix; |
| 2287 | function tryRemoveSuffix(str, suffix) { |
| 2288 | return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : undefined; |