List of usage examples for java.lang StringBuilder append
@Override public StringBuilder append(double d)
From source file:Main.java
public static void appendXmlEnd(StringBuilder sb, String param) { sb.append("</"); sb.append(param);/*from w w w . j a v a 2 s . c o m*/ sb.append(">"); }
From source file:Main.java
public static StringBuilder appendline(final StringBuilder in, final String text) { return in.append(text).append("\r\n"); }
From source file:Main.java
public static String combine(JSONArray[] s, String glue) { int k = s.length; if (k == 0)/*from w ww . j a v a2 s. c om*/ return null; StringBuilder out = new StringBuilder(); out.append(s[0]); for (int x = 1; x < k; ++x) out.append(glue).append(s[x]); return out.toString(); }
From source file:com.alibaba.jstorm.utils.SystemOperation.java
public static void mount(String name, String target, String type, String data) throws IOException { StringBuilder sb = new StringBuilder(); sb.append("mount -t ").append(type).append(" -o ").append(data).append(" ").append(name).append(" ") .append(target);/*from ww w.j a va 2 s . com*/ SystemOperation.exec(sb.toString()); }
From source file:Main.java
private static void addConstant(final StringBuilder sb, final String constantValue) { sb.append(" "); sb.append(constantValue);//from ww w . j av a2 s. c o m sb.append(",\n"); }
From source file:Main.java
public static String addFaceTag(String faceId) { StringBuilder builder = new StringBuilder(); builder.append(TAG_FACE); builder.append(faceId);//from w ww.ja va 2 s . c o m builder.append(TAG_END); return builder.toString(); }
From source file:Main.java
public final static String getBlockId(String fileName, int nodeId, int blockId) { StringBuilder sb = new StringBuilder(); sb.append(fileName); sb.append(nodeId);//from ww w . ja va 2s . c om sb.append(blockId); return sb.toString(); }
From source file:Main.java
public static void buildLink(TextView view, String url) { Log.d(TAG, "buildLink(view = " + view + ", url = " + url + ")"); StringBuilder sb = new StringBuilder(); sb.append("<a href='").append(url).append("'>").append(view.getText()).append("</a>"); view.setText(Html.fromHtml(sb.toString())); view.setMovementMethod(LinkMovementMethod.getInstance()); }
From source file:Main.java
public static String formatPhoneNumber(String mobile) { StringBuilder maskNumber = new StringBuilder(11); maskNumber.append(mobile.substring(0, 3)); maskNumber.append("****"); maskNumber.append(mobile.substring(7, mobile.length())); return maskNumber.toString(); }
From source file:Main.java
public static <T> String ListArrayAsString(final List<T[]> lstStringArray) { StringBuilder sb = new StringBuilder(); sb.append("{"); for (T[] sArr : lstStringArray) { sb.append("[").append(TextUtils.join(",", sArr)).append("]"); }/*from w w w. java 2s .c o m*/ sb.append("}"); return sb.toString(); }