Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8019987

String trimRight and trimLeft could be defined

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 8
    • 8
    • core-libs
    • None
    • b106
    • generic
    • generic

    Description

      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+$/, '');
         }
       }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: