anorgatarrak-wordpress-theme/node_modules/underscore.string/strRightBack.js

9 lines
263 B
JavaScript
Raw Permalink Normal View History

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;
};