dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/underscore.string/strRightBack.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

8 lines
263 B
JavaScript

var makeString = require('./helper/makeString');
module.exports = function strRightBack(str, sep) {
str = makeString(str);
sep = makeString(sep);
var pos = !sep ? -1 : str.lastIndexOf(sep);
return~ pos ? str.slice(pos + sep.length, str.length) : str;
};