/** * ** Filters an ID String, convertering all letters to lowercase and ** removing invalid * characters ** @param text The ID String to filter ** @return The filtered ID String */ public static String FilterID(String text) { // ie. "sky.12", "acme@123" if (text != null) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < text.length(); i++) { char ch = Character.toLowerCase(text.charAt(i)); if (DBRecordKey.isValidIDChar(ch)) { sb.append(ch); } } return sb.toString(); } else { return ""; } }