Category Archives: string manipulation

Quick Alphabet Array

Actionscript:
  1. var alphabet:Array = ("abcdefghijklmnopqrstuvwxyz").split("");
  2. trace("this is the letter b...", alphabet[1]);
  3. trace(alphabet);
  4. /* outputs:
  5. this is the letter b... b
  6. a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
  7. */

This is an easy way to create an array of the alphabet. It's easier to type than:

Actionscript:
  1. var alphabet:Array = ["a","b","c".... etc];

Also posted in arrays, strings | 3 Comments