package cn.jack.tool;

public final class StringTool {

	public static String ConversionAll(String str) {
		 
		str = charConversion(str);
		str = newlineConversion(str);
		return str;
	}
	
	public static String newlineConversion(String str) {
		
		str = str.replaceAll("\n", "<br>");
		return str;
	}
	
	public static String charConversion(String str) {
		
		str = str.replaceAll("&", "&amp;");
		str = str.replaceAll(" ", "&nbsp;");
		str = str.replaceAll("<", "&lt;");
		str = str.replaceAll(">", "&gt;");
		str = str.replaceAll("\"", "&quot");
		str = str.replaceAll("À½ÓïÍ¤","<a href='http://www.cargarden.net'>À½ÓïÍ¤</a>");
		return str;
	}
}
