Here is a little code snippet ;function Name(name)
local n = name
if strlen(n) > 18 then
n = strsub(n,1,15)
n = n.."..."
end
return n
end
to cut off very long Nick's, maybe to fit in, in a column or whatever...
Just wonder if there is a smother way to do this.
It's late, so I'm just going to throw out an idea without testing.
format("%"..width.."s", name);
It *should* behave like printf, allowing you to make nice columns. Only problem is you can't have the "...".
-NotRabidWombat
Doesn't ;format("%"..width.."s", name);
tell where the name begins?
E.g. 12 character from the begining, if width is 12 .
I'm not so familiar with function format.
**Edit
Hmm, change my mind ;))
format(%1.18s,name)
will do the job, to cut off the string.