stripWhitespace() Issue

22 views
Skip to first unread message

John Dell'Oso

unread,
Dec 3, 2012, 12:51:07 AM12/3/12
to js...@googlegroups.com
Hello,

I'm having trouble running the stripWhitespace function.

From the jsdb console:

js>str = "  John  ";
  John
js>stripWhitespace(str);
console:1       ReferenceError: stripWhitespace is not defined
js>system.stripWhitespace(str);
console:1       TypeError: system.stripWhitespace is not a function


Am I missing something here?

Regards,
JD

Shanti Rao

unread,
Dec 3, 2012, 12:13:04 PM12/3/12
to js...@googlegroups.com
Oops, documentation out-of-date.

Use String.trim() instead. This is a new feature in JavaScript 1.8

Thanks,

Shanti

John Dell'Oso

unread,
Dec 3, 2012, 6:10:48 PM12/3/12
to js...@googlegroups.com
Thanks for the update Shanti.
 
JD
Reply all
Reply to author
Forward
0 new messages