Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.4/underscore.string/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.4/underscore.string/rtrim.js

var makeString = require('./helper/makeString');
var defaultToWhiteSpace = require('./helper/defaultToWhiteSpace');
var nativeTrimRight = String.prototype.trimRight;

module.exports = function rtrim(str, characters) {
  str = makeString(str);
  if (!characters && nativeTrimRight) return nativeTrimRight.call(str);
  characters = defaultToWhiteSpace(characters);
  return str.replace(new RegExp(characters + '+$'), '');
};

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists