mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +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;
|
||
|
}
|