Lets see the original prototype.js v.1.5.1.1 strip method of String class:
strip: function() { return this.replace(/^\s+/, '').replace(/\s+$/, ''); } In my tests in various browsers this version of strip method: strip: function(str) { return this.replace(/^\s*(.*?)\s*$/, '$1'); } return it value slightly faster. And I think it's more "good style". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---