String中的replace方法
String中的replace方法也是很好用的方法,在这里记录下,以备日后工作查询:
/***将str中的$server_path$部份替换成http://sina.com**/String str = "$server_path$/Api.jsp?function=getLoginP";str = str.replace("$server_path$","http://sina.com");
?