dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/underscore.string/strLeftBack.js

9 lines
228 B
JavaScript
Raw Normal View History

2016-09-11 09:29:13 +01:00
var makeString = require('./helper/makeString');
module.exports = function strLeftBack(str, sep) {
str = makeString(str);
sep = makeString(sep);
var pos = str.lastIndexOf(sep);
return~ pos ? str.slice(0, pos) : str;
};