Nodejs String Remove removeFileExtension()

Here you can find the source of removeFileExtension()

Method Source Code

String.prototype.removeFileExtension = function()
{
    var re = /(.*)\.[^.]+$/;
    return re.test(this);
}

Related

  1. removeClasses(s)
    String.prototype.removeClasses = function(s)
        return this.replace(/style="[^"]*"|class="[^"]*"/gi, "");
    
  2. removeComma()
    String.prototype.removeComma = function() {
        return(this.replace(/,/g,''));
    
  3. removeDiacritics()
    String.prototype.removeDiacritics = function() {
        var result = this.replace(/i/g, 'i')
                    .replace(/?/, 'c');
        return result;
    
  4. removeDots()
    String.prototype.removeDots = function() {
      return this.replace(/\./g, '');
    };
    
  5. removeEndLine()
    String.prototype.removeEndLine = function() {
        var tmp = "";
        for(var i = 0, length = this.length; i < length; i++) {
            var c = this.charAt(i);
            if(c != "\n" && c != "\r") {
                tmp += c;
        return tmp;
    ...
    
  6. removeFromList(c)
    String.prototype.removeFromList=function(c){
      var arr=this.split(c), i=1;
      for(;i<arguments.length;i++) delete arr[arguments[i]-1];
      return arr.filter(function(v){return v!==undefined}).join(c);
    
  7. removeMascara()
    String.prototype.removeMascara = function () {
        if (this.valueOf())
            return this.valueOf().replace(/\.|\/|-|_/g, "");
        return "";
    
  8. removeMultipleWhitespaces()
    String.prototype.removeMultipleWhitespaces = function () {
        return this.replace(/\s\s+/g, ' ');
    };
    
  9. removeNonAlphabeticCharacters()
    String.prototype.removeNonAlphabeticCharacters = function() {
        var result = this.replace(/[^a-zA-Z ]/g, '');
        return result;