BetterChat / src /lib /utils /trimPrefix.ts
BetterAPI's picture
Duplicate from huggingchat/chat-ui
1ef0413
raw
history blame
150 Bytes
export function trimPrefix(input: string, prefix: string) {
if (input.startsWith(prefix)) {
return input.slice(prefix.length);
}
return input;
}