List of usage examples for java.lang StringBuffer append
@Override public synchronized StringBuffer append(double d)
From source file:Main.java
public static StringBuffer addEndTag(StringBuffer buf, String tagname) { buf.append(LT_BACKSLASH).append(tagname).append(GT); return buf;//from w w w. j av a2 s .co m }
From source file:Replace.java
public static String replace(String oldStr, String newStr, String inString) { int start = inString.indexOf(oldStr); if (start == -1) { return inString; }//from w w w . ja v a 2 s . c o m StringBuffer sb = new StringBuffer(); sb.append(inString.substring(0, start)); sb.append(newStr); sb.append(inString.substring(start + oldStr.length())); return sb.toString(); }
From source file:Main.java
public static String wrapStringByXmlType(String str) { StringBuffer sb = new StringBuffer(); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); sb.append(str);/* w w w. j av a 2s . c o m*/ return sb.toString(); }
From source file:Main.java
public static void openDocument(StringBuffer data) { data.append("<?xml version=\"1.0\"?>\n"); }
From source file:Main.java
static String makeXMLCloseElement(String elementName) { StringBuffer sb = new StringBuffer(); sb.append("</"); sb.append(elementName);/*from w w w.j a v a 2 s . c o m*/ sb.append(">"); return sb.toString(); }
From source file:Main.java
public static String getAttAsString(String name, String val) { StringBuffer sb = new StringBuffer(); sb.append(" " + name + "=\"" + val + "\""); return sb.toString(); }
From source file:Main.java
public static String buildInfoHuafei() { StringBuffer sb = new StringBuffer(); sb.append("<r>").append("<p n=\""); sb.append("mobilevoucher"); sb.append("\"/>").append("</r>"); return sb.toString(); }
From source file:Main.java
public static void endtag(StringBuffer buf, String tag) { buf.append("</" + tag + ">\n"); }
From source file:Main.java
public static String getAttAsString(final String name, final String val) { StringBuffer sb = new StringBuffer(); sb.append(" " + name + "=\"" + val + "\""); return sb.toString(); }
From source file:Main.java
public static String colorFont(String src, String color) { StringBuffer strBuf = new StringBuffer(); strBuf.append("<font color=").append(color).append(">").append(src).append("</font>"); return strBuf.toString(); }