Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - sindresorhus/splice-string: Remove or replace part of a string like Array#splice
Remove or replace part of a string like Array#splice - sindresorhus/splice-string
Visit SiteGitHub - sindresorhus/splice-string: Remove or replace part of a string like Array#splice
Remove or replace part of a string like Array#splice - sindresorhus/splice-string
Powered by 0x5a.live ๐
splice-string
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
index
Type: number
Index to start splicing.
count
Type: number
Number of characters to remove.
insert
Type: string
String to insert in place of the removed substring.
NodeJS Resources
are all listed below.
GitHub - marionebl/svg-term-cli: Share terminal sessions via SVG and CSS
resource
~/github.com
resource
GitHub - sindresorhus/public-ip: Get your public IP address - very fast!
resource
~/github.com
resource
GitHub - docsifyjs/docsify: ๐ A magical documentation site generator.
resource
~/github.com
resource
Made with โค๏ธ
to provide different kinds of informations and resources.