No such thing as a small change | |
PerlMonks |
Re^2: In search of a better way to trim stringby kiat (Vicar) |
on Jul 19, 2004 at 11:30 UTC ( [id://375522]=note: print w/replies, xml ) | Need Help?? |
Maybe just add a line to return the string when its length is shorter than the desired length. Otherwise, with a string like "this is a very long sentence", you get "this is a very long ..." instead of "this is a very long sentence". Thanks and cheers :)
In Section
Seekers of Perl Wisdom
|
|