chat-v4 / chat-ui /src /lib /utils /trimSuffix.ts
Матенков Андрей
Chat moved from github
39a2f10
raw
history blame contribute delete
165 Bytes
export function trimSuffix(input: string, end: string): string {
if (input.endsWith(end)) {
return input.slice(0, input.length - end.length);
}
return input;
}