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