Remove or replace part of a string like
Array#splice
It correctly handles slicing strings with emoji.
Install$ npm install splice-string
Usage
import spliceString from 'splice-string'; spliceString('unicorn', 3, 4, 'verse'); //=> 'universe' spliceString('❤️🐴🐴', 1, 1, '🦄'); //=> '❤️🦄🐴'API spliceString(string, index, count, insert?) string
Type: string
Type: number
Index to start splicing.
countType: number
Number of characters to remove.
insertType: string
String to insert in place of the removed substring.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4