insert

Inserts 'substr' into the 'value' at the 'index' provided.

Install

Install all functions of strman

yarn add strman

or just the insert function

yarn add strman.insert

Usage

import { insert } from 'strman'
// OR
import insert from 'strman.insert'
Parameters:
Name Type Description
value String

The String!

substr String

Value to insert.

index Number

Index to insert substr.

Source:
Returns:

String with substr added.

Type
String
Example
const title = "trman"
insert(title, 's', 0)
// => 'strman'