String trimRight and trimLeft could be defined

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b106
    • generic
    • generic

      Some node modules are making use of these functions.

      It could also be added by nodejar initialization scripts:
      if (!String.prototype.trimLeft) {
         String.prototype.trimLeft = function(){
           return this.replace(/^\s+/, '');
         }
       }
       
       if (!String.prototype.trimRight) {
         String.prototype.trimRight = function(){
           return this.replace(/\s+$/, '');
         }
       }

            Assignee:
            Jim Laskey
            Reporter:
            Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: