in reply to Re: Re: Re: Efficienty truncating a long string
in thread Efficienty truncating a long string
The lvalue substr doesn't actually return the string but a special lvalue indicating the offset and length. Creating this and setting it to '' involves a fair amount of overhead.
Which is actually more efficient will probably depend on how much you are truncating.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Efficienty truncating a long string
by dino (Sexton) on Dec 18, 2003 at 10:28 UTC | |
by ysth (Canon) on Dec 18, 2003 at 16:40 UTC |