/string-replace-all

Replaces all matching of a pattern in a string.

Primary LanguageJavaScriptMIT LicenseMIT

string-replace-all

Replaces all matching of a pattern in a string.

Usage

var replaceAll = require('string-replace-all');
replaceAll('path/to/file', '/', '-');
// => 'path-to-file'

API

replaceAll(str, pattern, newSubStr)

Returns the modified string.

str

Type: string

pattern

Type: string

newSubStr

Type: string