kc-strrepl

1.0.6 • Public • Published

STRRepl

[js] Replace all in string.

Install

npm install kc-strrepl

Use

var strrepl = require('kc-strrepl');
var srch = 'A'; // Search
var repl = 'B'; // Replace
var orig = 'A hello AA world A'; // Original string
var flag = 'gim'; // Regex flags (default: gim)
var str = strrepl(srch, repl, orig, flag);
console.log(str);

Readme

Keywords

Package Sidebar

Install

npm i kc-strrepl

Weekly Downloads

2

Version

1.0.6

License

ISC

Unpacked Size

1.93 kB

Total Files

5

Last publish

Collaborators

  • kaisarcode