chat-ui_test / src /lib /utils /trimPrefix.ts
coyotte508's picture
coyotte508 HF staff
✨ Remove endoftext (#70)
0abf663 unverified
raw
history blame
150 Bytes
export function trimPrefix(input: string, prefix: string) {
if (input.startsWith(prefix)) {
return input.slice(prefix.length);
}
return input;
}