package java.lang;

import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;

public class StringBuilder {
	private List<Character> string;

	public StringBuilder() {
		string = new ArrayList<Character>();
	}

	public StringBuilder(String s) {
		this();
		append(s);
	}

	public StringBuilder append(Character[] arr) {
		for (Character c : arr) {
			string.add(c);
		}
		return this;
	}

	public StringBuilder append(char[] arr) {
		Character[] ch = new Character[arr.length];
		for (int i = 0; i < arr.length; ++i) {
			ch[i] = arr[i];
		}
		return append(ch);
	}

	public StringBuilder append(String s) {
		return append(s.toCharArray());
	}

	public StringBuilder append(Object o) {
		return append(o.toString());
	}

	public StringBuilder append(boolean b) {
		return append(Boolean.valueOf(b));
	}

	public StringBuilder append(char c) {
		return append(Character.valueOf(c));
	}

	public StringBuilder append(int i) {
		return append(Integer.valueOf(i));
	}

	public StringBuilder append(long lng) {
		return append(Long.valueOf(lng));
	}

	public StringBuilder append(float f) {
		return append(Float.valueOf(f));
	}

	public StringBuilder append(double d) {
		return append(Double.valueOf(d));
	}

	public String toString() {
		char[] arr = new char[string.size()];
		for (int i = 0; i < arr.length; ++i) {
			arr[i] = string.get(i);
		}
		return new String(arr);
	}

	public int length() {
		return string.size();
	}
}
@@ -1210,32 +1210,1572 @@
 alueOf(d));%0A%09%7D%0A%0A
+%09public StringBuilder insert(int offset, Character%5B%5D arr) %7B%0A%09%09for (Character c : arr) %7B%0A%09%09%09string.add(offset++, c);%0A%09%09%7D%0A%09%09return this;%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, char%5B%5D arr) %7B%0A%09%09Character%5B%5D ch = new Character%5Barr.length%5D;%0A%09%09for (int i = 0; i %3C arr.length; ++i) %7B%0A%09%09%09ch%5Bi%5D = arr%5Bi%5D;%0A%09%09%7D%0A%09%09return insert(offset, ch);%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, String s) %7B%0A%09%09return insert(offset, s.toCharArray());%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, Object o) %7B%0A%09%09return insert(offset, o.toString());%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, boolean b) %7B%0A%09%09return insert(offset, Boolean.valueOf(b));%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, char c) %7B%0A%09%09return insert(offset, Character.valueOf(c));%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, int i) %7B%0A%09%09return insert(offset, Integer.valueOf(i));%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, long lng) %7B%0A%09%09return insert(offset, Long.valueOf(lng));%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, float f) %7B%0A%09%09return insert(offset, Float.valueOf(f));%0A%09%7D%0A%0A%09public StringBuilder insert(int offset, double d) %7B%0A%09%09return insert(offset, Double.valueOf(d));%0A%09%7D%0A%0A%09public StringBuilder delete(int start, int end) %7B%0A%09%09for (int i = start; i %3C end; ++i) %7B%0A%09%09%09string.remove(start);%0A%09%09%7D%0A%0A%09%09return this;%0A%09%7D%0A%0A%09public String substring(int start) %7B%0A%09%09return substring(start, length());%0A%09%7D%0A%0A%09public String substring(int start, int end) %7B%0A%09%09char%5B%5D c = new char%5Bend - start%5D;%0A%09%09for (int i = start; i %3C end; ++i) %7B%0A%09%09%09c%5Bi - start%5D = string.get(i);%0A%09%09%7D%0A%09%09return new String(c);%0A%09%7D%0A%0A
 %09public String t

insert and delete for stringbuilder