This package has been deprecated

Author message:

see @kingjs/string-ex.replace-all

@kingjs/string.replace-all

1.0.0 • Public • Published

@kingjs/string.replace-all

Returns a new string in which all occurrences of a substring are replaced with another string.

Usage

var assert = require('assert');
var replaceAll = require('@kingjs/string.replace-all');

var target = "fooBarFooBar";
var result = replaceAll.call(target, 'Bar', 'Moo');
assert(result == 'fooMooFooMoo');

API

replaceAll(this, oldValue, newValue)

Parameters

  • this: The string to search and replace.
  • oldValue: The string to be replaced.
  • newValue: The string to replace all occurrences of oldValue.

Returns

A string that is equivalent to the current string except that all instances of oldValue are replaced with newValue.

Install

With npm installed, run

$ npm install @kingjs/string.replace-all

Source

https://repository.kingjs.net/string/replace-all

License

MIT

Analytics

Readme

Keywords

none

Package Sidebar

Install

npm i @kingjs/string.replace-all

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.43 kB

Total Files

4

Last publish

Collaborators

  • kingces95