1 4 5 9 10 package org.openlaszlo.media; 11 12 17 public class FontType { 18 public static final String FFT = "fft"; 19 public static final String TTF = "ttf"; 20 21 24 public static String fromName(String name) { 25 int index = name.lastIndexOf('.'); 26 if (index == -1 || index + 2 >= name.length()) { 27 return ""; 28 } 29 30 return name.substring(index+1).toLowerCase(); 31 } 32 } 33 34 | Popular Tags |