String readBetweenWords(String para, String string1, String string2) {
int a= para.indexOf(string1);
if (a== -1) {
return "";
}
int b= para.lastIndexOf(string2);
if (b== -1) {
return "";
}
int aa= a+ string1.length();
if (aa>= b) {
return "";
}
return para.substring(aa, b);
}
No comments:
Post a Comment