请参阅:
How to see if a substring exists inside another string in Java 1.4
Searching for one string in another string
How to search a string in another string?
我有两个字符串,如下:
String str1 = "He is doing very good";
String str2 = "doing";
我想知道如何在字符串str1
中找到“正在”这个词,即使str1
如此更改:
str1 = "He isdoing very good";