strRight.js 255 B

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