String cooked; cooked = string.substring(0, 2); cooked = cooked + "_"; cooked = cooked + string.substring(offset+1, offset+3); string = cooked;
String langPrefix = string.substring(0, 2); if (!nsmutablearray.containsObject(langPrefix)) nsmutablearray.insertObjectAtIndex(langPrefix, 0);  StringBuffer cooked = new StringBuffer(string.length()); cooked.append(langPrefix) .append("_") .append(string.substring(offset+1, offset+3)); string = cooked.toString();
    protected NSArray fixAbbreviationArray(NSArray languages) {        NSMutableArray nsmutablearray = new NSMutableArray(languages.count());        int cnt = languages.count();        for (int i = 0; i < cnt; i++) {            String string = (String) languages.objectAtIndex(i);            int offset;            string = string.trim();            offset = string.indexOf(';');            if (offset > 0)                string = string.substring(0, offset);            offset = string.indexOf('-');            if (offset > 0) {                String cooked;                cooked = string.substring(0, 2);                cooked = cooked + "_";                cooked = cooked + string.substring(offset+1, offset+3);                string = cooked;            }            nsmutablearray.addObject(string);        }        return nsmutablearray;    }