Hey Jean, thanks for the reply.
It's definitely a runtime thing, since I'm dealing with dynamically-generated labels, populated with pre-existing content that needs to be displayed in multiple Views (so in some cases it would be possible to fit the entire label, and in others not) . . . The function / action would basically, examine a string, and if the length exceeds N number of characters, remove all characters beyond the cutoff point and replace them with ellipses. So if an entry says "New York City", and the cutoff is set at 7, the display would read "New Yor..."
So in pseudo-code, probably something like
function truncate(string, cutoff){
newString = string.substr(0,cutoff-1) + "...";
return newString;
}
// function call
truncate("New York City",7);
For practical reference, look at what iOS does in the screenTitle area with song titles when you move from the track listing to a specific track. Also see Windows Explorer, as you make columns narrower, text gets truncated. In this case, if you mouseover the text, you also get a tooltip displaying the complete string. I don't really need that (though would be a nice feature).
Make sense?
Thanks again!