Get length from first line textfield


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function firstLineLength(text:String):int {
  2. var reg:RegExp = /^[\S ]*/m;
  3. var length:int = String(reg.exec(text)).length;
  4. return length;
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.