Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q1310

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


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.