UNPKG

@thi.ng/strings

Version:

Various string formatting & utility functions

15 lines 627 B
/** * Forms a new strings which inserts given `insert` string into `src` * string at `from` position and appends remaining `src` chars from * original `to` position. If `from` and `to` are equal (`to` by default * is), the operation is a pure insertion. If not, then some chars from * `src` will be removed in the new string. If either position is * negative, it'll be considered relative to the end of the `src`. * * @param src - * @param insert - * @param from - * @param to - */ export declare const splice: (src: string, insert: string, from: number, to?: number) => string; //# sourceMappingURL=splice.d.ts.map