private String replace_all(String s, final String from, final String to)
 {
	int index = 0;
	while ((index = s.indexOf(from)) != -1)
	{
	 s = s.substring(0, index) + to + s.substring(index + from.length());
	}
	return s;
 }