mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-27 12:35:35 +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;
|
|
} |