trim-left-by-char

Removes specified character from the left end of a string.

Usage no npm install needed!

<script type="module">
  import trimLeftByChar from 'https://cdn.skypack.dev/trim-left-by-char';
</script>

README

trim-left-by-char

Trim a string from the left removing it of provided character.

Install

$ npm install --save trim-left-by-char

Usage

const trimLeftByChar = require('trim-left-by-char');

trimLeftByChar('00unicorns', 0);
//=> 'unicorns'

API

trimLeftByChar(input, char)

input

Type: string

Input string that you want to trim of characters.

char

Type: string
Default: ''

Character you want to trim from string.

License

MIT © Vedran Blazenka