4 lines
190 B
TypeScript
4 lines
190 B
TypeScript
export function replaceSelection(text: string, selection: [number, number], replacement: string): string {
|
|
return text.substr(0, selection[0]) + replacement + text.substr(selection[1]);
|
|
}
|