/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* ** @name : cutString() ** @description : cut a string for n chars */ protected function cutString(s:String, v:uint = 4):String { return ( (s.length> v)?s.substr(0,v):s ); }
URL: http://www.undolog.com/2008/06/04/very-short-snippet-cutstring/
Comments
