Fixed the broken fix
This commit is contained in:
parent
9d18abf1ed
commit
f0618d6338
@ -103,10 +103,10 @@ class Main {
|
||||
* @return The wanted substring.
|
||||
*/
|
||||
private static String stringBetween(String string, String start, String end) {
|
||||
if (!string.contains(start)) {
|
||||
int startPos = string.indexOf(start) + start.length();
|
||||
if (!string.contains(start) || string.indexOf(end, startPos) < startPos) {
|
||||
return "";
|
||||
}
|
||||
int startPos = string.indexOf(start) + start.length();
|
||||
return string.substring(startPos, string.indexOf(end, startPos));
|
||||
}
|
||||
}
|
@ -350,10 +350,10 @@ public class Server {
|
||||
* @return The wanted substring.
|
||||
*/
|
||||
private static String stringBetween(String string, String start, String end) {
|
||||
if (!string.contains(start)) {
|
||||
int startPos = string.indexOf(start) + start.length();
|
||||
if (!string.contains(start) || string.indexOf(end, startPos) < startPos) {
|
||||
return "";
|
||||
}
|
||||
int startPos = string.indexOf(start) + start.length();
|
||||
return string.substring(startPos, string.indexOf(end, startPos));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user