List of usage examples for java.lang StringBuilder StringBuilder
public StringBuilder(CharSequence seq)
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); System.out.println(buffer.codePointBefore(2)); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); System.out.println(buffer.lastIndexOf("a", 10)); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); System.out.println(buffer.subSequence(1, 2)); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); System.out.println(buffer.codePointCount(2, 3)); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); System.out.println(buffer.substring(2)); }
From source file:Main.java
public static void main(String args[]) { StringBuilder buffer = new StringBuilder("hello there from java2s.com"); char charArray[] = new char[buffer.length()]; buffer.getChars(0, buffer.length(), charArray, 0); System.out.print("The characters are: "); }
From source file:Main.java
public static void main(String args[]) { StringBuilder sb = new StringBuilder("java2s.com"); System.out.println("buffer before = " + sb); System.out.println("charAt(1) before = " + sb.charAt(1)); sb.setCharAt(1, 'i'); System.out.println("buffer after = " + sb); System.out.println("charAt(1) after = " + sb.charAt(1)); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); CharSequence cs = "java2s.com"; buffer.insert(2, cs, 1, 3);//w w w . j a va 2 s .com System.out.println(buffer); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); CharSequence cs = "java2s.com"; buffer.insert(2, cs);/*www. java2 s . c o m*/ System.out.println(buffer); }
From source file:Main.java
public static void main(String[] arg) { StringBuilder buffer = new StringBuilder("from java2s.com"); buffer.appendCodePoint(66);//from w ww . ja va 2s .c om System.out.println(buffer); }