我有这段代码。
在 for 循环中(这就是 i 的作用),但当我运行此代码时,没有任何替换。我使用方法不正确吗?
String txt = "<p style=\"margin-top: 0\">";
txt.replace("style=\"margin-top: 0\"","class=\"style_" + i + "\"");
在 for 循环中(这就是 i 的作用),但当我运行此代码时,没有任何替换。我使用方法不正确吗?