[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: PATCH: kspread html export
From:       Carsten Pfeiffer <carpdjih () cetus ! zrz ! tu-berlin ! de>
Date:       2001-07-29 21:33:20
[Download RAW message or body]

On Sun, Jul 29, 2001 at 10:32:18PM +0200, Nicolas Goutte wrote:
> 
> Just as a note, you could also write it:
> 
>   text.replace(QRegExp("&"), "&amp;")
>        .replace(QRegExp("<"), "&lt;")
>        .replace(QRegExp(">"), "&gt;");

I can imagine this being pretty slow. Why use a regular expression, 
if all you want to do is replacing one character with some others?
Especially doing this three times. Better iterate over all characters
of `text' and replace all the &,<,> manually.

Cheers
Carsten Pfeiffer
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic