isSpaceOrTab()
Darin Adler
darin at apple.com
Mon Feb 23 23:31:19 CET 2004
On Feb 21, 2004, at 9:46 AM, Harri Porten wrote:
> I see that JavaScriptCore is using a helper function isSpaceOrTab()
> rather than standard isspace() when parsing date strings. What was the
> reason?
Definitely not speed. Most platforms have nicely optimized isspace
functions.
I believe the reason I changed that was because the old code would
allow characters like '\n' and '\r' and I had some test case that
indicated it was incorrect to allow such characters. But I can't any
such test case at the moment, so I'm puzzled, and the change log entry
I wrote doesn't show a clue.
I think that using isspace instead is probably fine, but someone should
probably test space characters other than ' ' and '\t' to make sure we
are consistent with the date parsers in other browsers.
-- Darin
More information about the Khtml-devel
mailing list