#2444: V3: Utility functions
--------------------------+-------------------------------------------------
  Reporter:  fredck       |       Owner:  fredck                       
      Type:  New Feature  |      Status:  assigned                     
  Priority:  Normal       |   Milestone:  CKEditor 3.0                 
 Component:  General      |     Version:                               
Resolution:               |    Keywords:  Confirmed V3ProtoBase Review?
--------------------------+-------------------------------------------------

Comment(by fredck):

 Replying to [comment:4 martinkou]:
 > Is there any reason the *trim functions are written like this?

 This is just a micro-optimization...

 At runtime, regular expressions are parsed and compiled before run.
 Defining them as private variables in a closure make it work like a
 "cache" as the parsing and compilation is done only once.

 Also, looking at your comment, just came to my eyes that th ltrim and
 rtrim regexes have extra stuff copied from trim that is not needed. I've
 fixed it with [2347].

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2444#comment:5>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to