java删除字符串中的某些字符 1 周,3 日 Questions & Answers 54 我想删除下面字符串中的等号 String str = "[=Ind(\"Blr-ind\",\"Company\")]";
# 1 楼答案 在字符串上使用String.replaceFirst(): String input = "[=Ind(\"Blr-ind\",\"Company\")]"; input = input.replaceFirst("=", ""); System.out.println(input); 输出: [Ind("Blr-ind","Company")]
# 1 楼答案
在字符串上使用
String.replaceFirst()
:输出: