Here’s a handy little code snippet. Need to append the placement of a number? Use this!
?View Code ACTIONSCRIPT1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
private function getNth (num:Number):String
{
var qn:int = ((num%100) / 10);
var rn:int = num % 10;
var suffix:String = "th";
if (qn != 1) {
switch (rn) {
case 1: suffix = "st"; break;
case 2: suffix = [...]
Trending Articles
More Pages to Explore .....