mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 03:32:20 +08:00
5 lines
150 B
TypeScript
5 lines
150 B
TypeScript
export function trimEnd(text: string, trimChar: string): string {
|
|
return text.slice(-1) === trimChar
|
|
? text.slice(0, -1)
|
|
: text;
|
|
} |