H Interesting Dominik.
Thanks for the information.
It's sure is clean, but didn't know that performance of regexp is
good in this case..
What I want is: if a character at index X is a white space. That means
I always have to take first a substring of one character and then do a
match. So
if performance is really that critical you should test several
alternatives and check which one is really the best for your case (and
don't forget to test cross-browser; especially IE)
On Sep 30, 10:32 am, Ed post2edb...@hotmail.com wrote:
H Interesting Dominik.
Thanks for the
Yes I can, but don't want to, as it's way to heave for just checking
if a character is a white space... Especialy in my case where
performance is an issue.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google Web
Hi Ed,
for performance reason I would definitely recommend you to actually
use regex instead of equals or equalsIgnoreCase methods of the String
class. Especially IE has really performance problems with former ones.
Concerning heavy, I would actually say that it is much cleaner to use
What is the correct way to check for a white space character?
This is done by the method Character.isWhitespace(char) but not
supported by GWT. What is the alternative?
I know check for whiteSpaces through
someString.charAt(index) == ' ';
But I am not sure if that's good enough as I think I
did you try to use the regex method
boolean matches = someString.matches(\\S);
HTH
Dominik
On 28 Sep., 13:39, Ed post2edb...@hotmail.com wrote:
What is the correct way to check for a white space character?
This is done by the method Character.isWhitespace(char) but not
supported by GWT.