public static String replaceAll(String s, String before, String after) {
		int next = s.indexOf(before);
		if (next < 0) {
			return s;
		}
		StringBuilder buff = new StringBuilder(s.length() - before.length() + after.length());
		int index = 0;
		while (true) {
			buff.append(s.substring(index, next)).append(after);
			index = next + before.length();
			next = s.indexOf(before, index);
			if (next < 0) {
				buff.append(s.substring(index));
				break;
			}
		}
		return buff.toString();
	}