Guest User

Untitled

a guest
Dec 15th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function string friendlyNumber(N:number)
  2. {
  3. S = "" + N
  4. RS = ""
  5. Length = S:length()
  6.  
  7. for(I=1,Length,1)
  8. {
  9. RS += S[I]
  10. if((Length - I) % 3 == 0 && I != Length)
  11. {
  12. RS+=","
  13. }
  14. }
  15.  
  16. return RS
  17. }
Add Comment
Please, Sign In to add comment