rmtrailing
Version:
Removes dynamic trailing substring
27 lines (20 loc) • 487 B
Markdown
dynamic trailing 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
None
```javascript
var slash = '/';
rmTrailing('hello/world/', slash); //'hello/world',
rmTrailing('hello/world//', slash); //'hello/world'
rmTrailing('hello/world', slash) //'hello/world'
rmTrailing('///', slash); //''
rmTrailing('', slash) //''
```
Removes