rmleading
v1.0.1
Published
Removes dynamic leading substring
Downloads
69
Maintainers
Readme
rmleading
Removes dynamic leading substring. Use if: what you want to remove is stored in a variable. Otherwise: you may want to use .replace() or a more specific module
How to use
Prerequisite
None
Example
var slash = '/';
rmLeading('/hello/world', slash); //'hello/world',
rmLeading('//hello/world', slash); //'hello/world'
rmLeading('hello/world', slash) //'hello/world'
rmLeading('///', slash); //''
rmLeading('', slash) //''