got to a stable point again. next up is comming up with a decent API for modifications
This commit is contained in:
parent
4fb7405466
commit
fc22ce6027
19 changed files with 498 additions and 375 deletions
|
@ -1,3 +1,6 @@
|
|||
export const splice = (subject: string, start: number, end: number, replacement: string) => {
|
||||
return `${subject.slice(0, start)}${replacement}${Object.is(end, -0) ? '' : subject.slice(end)}`;
|
||||
};
|
||||
export const splitAt = (subject: string, index: number): readonly [string, string] => {
|
||||
if (index < 0) {
|
||||
return [subject, ''];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue