[Gambas-user] Another possible change...
Benoit Minisini
gambas at ...1...
Sun Dec 14 21:59:52 CET 2003
On Sunday 14 December 2003 21:47, Benoit Minisini wrote:
> > Daniel Campos wrote:
> > newString = myString.Reverse()
> >
> > Using Split and Join methods, we could reverse a sentence word by word:
> >
> > newString = myString.Split(/\s/).Reverse().Join(' ')
> >
Array.Reverse() is done, but does not return anything. So the previous example
needs at least two lines of code !
I did it, because returning an object reference has a cost, so it must be
avoided as possible.
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list