Posted By

GunnarHKarlsson on 10/01/11


Tagged

truncate


Versions (?)

truncate String


 / Published in: ActionScript 3
 

  1. private function truncate(str:String):String{
  2. if(str.length > 30){
  3. str = str.slice(0,30);
  4. str += "...";
  5. }
  6. return str;
  7. }

Report this snippet  

You need to login to post a comment.