String (long num) { long mod = Math.abs(num) % 100; if (mod < 11 || mod > 13) { mod = mod % 10; if (mod == 1) return num + "st"; if (mod == 2) return num + "nd"; if (mod == 3) return num + "rd"; } return num + "th"; }