Posted By

gfazioli on 06/04/08


Tagged

utilities


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

gfazioli
THEPWN3R


Very short snippet: cutString()


 / Published in: ActionScript 3
 

URL: http://www.undolog.com/2008/06/04/very-short-snippet-cutstring/

  1. /*
  2. ** @name : cutString()
  3. ** @description : cut a string for n chars
  4. */
  5. protected function cutString(s:String, v:uint = 4):String {
  6. return ( (s.length> v)?s.substr(0,v):s );
  7. }

Report this snippet  

You need to login to post a comment.