/ Published in: ActionScript 3

Extremely simple... just pass in the string you want to ellipse, and the position you want to do it at. The code takes care of the rest.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private function ellipsed(fullString:String, cutOff:Number):String { if(fullString.length < cutOff) { return fullString; } else { var ellipsedString:String = fullString.substr(0, (cutOff - 3)); ellipsedString += "..."; } return ellipsedString; }
Comments
