Here you can find the source of translate(String str, String string_in, String string_out)
private static final String translate(String str, String string_in, String string_out)
//package com.java2s; //License from project: Open Source License public class Main { private static final String translate(String str, String string_in, String string_out) { String s = str.toUpperCase(); char[] outc = new char[s.length()]; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); int j = string_in.indexOf(c); outc[i] = string_out.charAt(j); }/* w w w. ja v a2 s .co m*/ String outs = new String(outc); return outs; } }