All pastes #72999 Raw Edit

SkareCrow

public java v1 · immutable
#72999 ·published 2006-06-27 09:38 UTC
rendered paste body
public class JApp2 {    public static String configStr(String s) {        String s1 = s;        try {            int i = 0;            String as[] = new String[7];            String as1[] = {"z", "a", "r", "p", "a", "g", "t", "q", "r", "s", "e"};            for(int j = 0; j < 6; j++) {                if(j % 2 != 0) {                    as[i] = (new StringBuilder()).append(j).append("").toString();                    i++;                }            }            for(int k = 6; k > 0; k--) {                if(k % 2 != 0) {                    as[i] = (new StringBuilder()).append(k).append("").toString();                    i++;                }            }            as[1] = as[2];            as[2] = as[0];            as[3] = "10";            int l = 0;            String s2 = "";            s1 = "";            for(l = 0; l < as.length - 2; l++) {                if(Integer.parseInt(as[l]) > 6) {                    continue;                }                String s3 = as1[Integer.parseInt(as[l])];                if(l == 0) {                    s3 = s3.toUpperCase();                }                s1 = (new StringBuilder()).append(s1).append(s3).append(as[l]).toString();            }            s1 = (new StringBuilder()).append(s1).append(as1[Integer.parseInt(as[3])]).append(as[l]).toString();        }        catch(Exception exception) {            System.out.println((new StringBuilder()).append("XString.configStr() Exception: ").append(exception).toString());        }        return s1;    }}