protected String formatText(String input, MutableInteger selectionHandle) { int customHandle = input.indexOf(BaseModule.SELECTION_HANDLE); if (customHandle >= 0) { selectionHandle.set(customHandle); input = input.replace(Character.toString(BaseModule.SELECTION_HANDLE), ""); } if (mSolver != null) { // Add grouping, and then split on the selection handle // which is saved as a unique char String grouped = mEquationFormatter.addComas(mSolver, input, selectionHandle.intValue()); if (grouped.contains(String.valueOf(BaseModule.SELECTION_HANDLE))) { String[] temp = grouped.split(String.valueOf(BaseModule.SELECTION_HANDLE)); selectionHandle.set(temp[0].length()); input = ""; for (String s : temp) { input += s; } } else { input = grouped; } } return mEquationFormatter.insertSupScripts(input); }
protected String cleanExpression(String expr) { expr = EquationFormatter.appendParenthesis(expr); expr = Solver.clean(expr); expr = mTokenizer.getLocalizedExpression(expr); return expr; }