Proposal for String Algorithms Library

hi boosters I would like to propose one more algorithm to SAL -- squeeze. It removes leading/trailing spaces and duplicate spaces between words. So sample string " This is \n\n a test \n" become "This is\na test". I use this function with XML/HTML related code to 'normalize' content... Hope this will help to smbd else ;) Have fun!

Hi, On Thu, Jul 22, 2004 at 09:43:59AM +0400, zaufi@sendmail.ru wrote:
hi boosters
I would like to propose one more algorithm to SAL -- squeeze. It removes leading/trailing spaces and duplicate spaces between words. So sample string " This is \n\n a test \n" become "This is\na test". I use this function with XML/HTML related code to 'normalize' content... Hope this will help to smbd else ;)
Thank, this seems like a good idea. I will put it to my todo list. In regard to XML/HTML I'm also planing to add some support for transformation of characters like <, > to < > It is quite easy to do it now, but it can be done more conviniently. Stay tuned. Regards, Pavol
participants (2)
-
Pavol Droba
-
zaufi@sendmail.ru