str-replace-all

Replaces all occurences of a string in another string.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
str-replace-all
100.3.09 years ago9 years agoMinified + gzip package size for str-replace-all in KB

Readme

str-replace-all
Replaces all occurences of a string in another string.

Installation

```` npm install --save str-replace-all ````

Arguments

needle

The string to be searched for

replace

The string which replaces the needle string.

haystack

The string which is searched for the needle string.

Usage

```` var strReplaceAll = require('str-replace-all'); strReplaceAll('lorem ipsum lorem ipsum lorem ipsum', 'ipsum', 'lorem'); => "lorem lorem lorem lorem lorem lorem" ````