BililiveRecorder/config_gen/utils.ts

5 lines
150 B
TypeScript
Raw Normal View History

2021-08-13 21:03:21 +08:00
export function trimEnd(text: string, trimChar: string): string {
return text.slice(-1) === trimChar
? text.slice(0, -1)
: text;
}