[Gambas-user] trimming extra spaces from within a string.
bsteers4 at gmail.com
Tue Nov 10 00:07:41 CET 2020
On Mon, 9 Nov 2020 at 22:54, Fabien Bodard <gambas.fr at gmail.com> wrote:
> And .. sorry I'm on phone but
> Just walk on the string if not space add to new string ...if first space
> too... jump to the next not space letter ...etc ?
> Is this not more faster than using a recursive call to replace ?
> The 3 ms gain from benoit can come from the fact he not use trim.
Aah yes i see, thank you (me wishful thinking lol)
I went for Benoits method , way better than mine :)
>> On Tue, Nov 10, 2020 at 12:43 AM Jussi Lahtinen <jussi.lahtinen at gmail.com>
>>> Your way is run only twice, the other ways are run 500 times. Thus it
>>> seems your way is faster.
>>> You already have this program, it is the IDE. See profiler.
Fantastic, now that's a handy tool I've only just discovered :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User