LunaChat v3.0.11 : Fixed issue #201

このコミットが含まれているのは:
ucchy committed 2020-08-16 10:37:19 +09:00
1 親 0c8212e979
コミット 854abef1b3
3ファイル変更
+33 -4

検索条件に一致するファイルはありません

+4 -3
ファイルの表示
@@ -29,9 +29,10 @@ public class KeywordReplacer {
* @param value 値
*/
public void replace(String keyword, String value) {
int start;
while ( (start = str.indexOf(keyword)) > -1 ) {
str.replace(start, start + keyword.length(), value);
int index = 0;
while ( (index = str.indexOf(keyword, index)) > -1 ) {
str.replace(index, index + keyword.length(), value);
index += value.length();
}
}