sort by length of line

Devin Asay devinasay at gmail.com
Sun Dec 11 23:49:32 EST 2011


On Dec 11, 2011, at 9:04 PM, <dunbarx at aol.com>
 wrote:
> 
> I can do this the long way, but is there a clever sortkey that will sort lines by the length of those lines?
> 
> In other words, if I have a variable myVar with:
> 
> aaaaaaa
> xxx
> bbbb
> 
> I want to write something like:
> 
> sort myVar by the length of each
> 
> to yield:
> 
> xxx
> bbbb
> aaaaaaa

Actually, Craig, what you wrote works just fine. I tried:

sort lines of fld 1 by the length of each

Worked a treat.

Devin


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University





More information about the use-livecode mailing list