Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q1310, September 09, 2002 at 11:55:00:

You are here: irt.org | About | Feedback | 4134 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q1310

Sent by
Mauricio Zuluaga on September 09, 2002 at 11:55:00:

Comments:
Reading at the documentation for RegExp I found that the replace method returns a new string. It doesn't modify the string that invokes the method.

I change the trim function to this in order to make it work:

function trim(str)
{
var newString = str.replace(/^\s*/, '').replace(/\s*$/, '');
return newString;
}


Other feedback on 'irt.org FAQ Knowledge Base Q1310' - show all

©2018 Martin Webb