str_replace
v0.1.6
Published
replace all occurrences of one string with another
Downloads
18
Readme
str_replace
Replace all occurrences of one string with another that according to Fagner is faster than regex. Functionality is available PHP form :scream: str_replace(from, to, source [,ignoreCase])
.
Install :hammer:
npm install str_replace
Usage :bulb:
var str_replace = require('str_replace');
result = str_replace('.', '.', source);
console.log(result); // okay this is a string
result = str_replace('is', 'AK', source);
console.log(result); // okay thAK AK a string