Will benchmark all this. On Tue, Nov 4, 2008 at 7:10 PM, Andrea Giammarchi <[EMAIL PROTECTED]> wrote: > But in this case you are checking twice for each character, start less than > end plus the other check. > For small strings the best option culd be return the regexp version > /^\s+|\s+$/g while for strings with length more than N (dunno which length > is big enough) we can use my last proposal without problems, a charcode > instead of start < end wont make the difference, IMO :-) > > On Tue, Nov 4, 2008 at 10:02 PM, Ariel Flesler <[EMAIL PROTECTED]> wrote: >> >> That does, but will iterate doubly for strings made of spaces. That's >> why I added the check. > > > > >
-- Ariel Flesler http://flesler.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
