Libraryless. Click here for Pure Java version (1741L/11K/27K).
// Syntax: s == "bla" !636 !JavaTok !sf public class main { public static void main(String[] args) throws Exception { String s = loadMainJava(); List<String> tok = JavaTok.split(s); for (int i = 1; i+6 < tok.size(); i += 2) if (Character.isLetter(tok.get(i).charAt(0)) && "!=".indexOf(tok.get(i+2)) >= 0 && tok.get(i+4).equals("=") && tok.get(i+6).startsWith("\"")) { String var = tok.get(i), str = tok.get(i+6); boolean neg = tok.get(i+2).equals("!"); for (int j = i; j <= i+6; j++) tok.set(j, ""); tok.set(i, (neg ? "!" : "") + str + ".equals(" + var + ")"); i += 6; } saveMainJava(JavaTok.join(tok)); } }
Began life as a copy of #1000635 Now handles != too
download show line numbers debug dex old transpilations
Travelled to 21 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, dhtvkmknsjym, gwrvuhgaqvyk, hxnwyiuffukg, ishqpsrjomds, jlatgrcjtklg, jtubtzbbkimh, liwcxgsjrgqn, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment