[Webkit-unassigned] [Bug 26590] Support for String.trim(), String.trimLeft() and String.trimRight() methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 24 15:24:53 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26590





------- Comment #18 from ioseb.dzmanashvili at gmail.com  2009-06-24 15:24 PDT -------
(In reply to comment #17)

> Please cite an example of a particular character that your function return true
> for and isStrWhiteSpace returns false for. And if these functions are
> different, please change the name of your to make it clear why it's different.

Darin,

I'm very sorry, I wasn't careful enough.. problem was really in code I used to
test capabilities of "isStrWhiteSpace". Real problem is in one character
"\u200B" - ZERO WIDTH SPACE (category Cf) for other white space characters
"isStrWhiteSpace" works perfectly. Obviously I need to remove my own
function(at least rewrite) and what would be your suggestion? one solution is
to check this particular character in the "while" condition, second I think
would be creating inline function that wraps "isStrWhiteSpace()" function and 
"\u200B" character check, something like this:

>static inline bool isCharWhiteSpace(int c) {
> return isStrWhiteSpace(c) || c == 0x200b;
>}

third one would ignoring this particular char.. but I thinks this solution is
not suitable..


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list