BililiveRecorder/config_gen/utils.ts
2021-08-13 21:03:21 +08:00

5 lines
150 B
TypeScript

export function trimEnd(text: string, trimChar: string): string {
return text.slice(-1) === trimChar
? text.slice(0, -1)
: text;
}