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

9 lines
255 B
JavaScript

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