private String post_content = "fromid=#fromid#”
现在我post_content.replace( "#fromid#" ,"123" ),怎么替换不了呢,看了下api,也不明白
#应该没什么特殊含义啊
现在我post_content.replace( "#fromid#" ,"123" ),怎么替换不了呢,看了下api,也不明白
#应该没什么特殊含义啊
调试欢乐多
public class Test {
public static void main(String[] args){
String post_content = "fromid=#fromid#";
System.out.println(post_content.replace( "#fromid#" ,"123" ));
}
}
格式错了
post_content=post_content.replace("#fromid#", "123");
这样的。替换后,还要把结果赋值给一个变量,不然,替换后,就没了,他不是在原字符串的替换的