mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor StatServlet and add api page
This commit is contained in:
@@ -28,11 +28,10 @@ public class StringUtils {
|
||||
public static String subString(String src, String start, String to) {
|
||||
int indexFrom = src.indexOf(start);
|
||||
int indexTo = src.indexOf(to);
|
||||
if (indexFrom < 0 || indexTo < 0 || indexFrom < indexTo) {
|
||||
if (indexFrom < 0 || indexTo < 0 || indexFrom > indexTo) {
|
||||
return null;
|
||||
}
|
||||
indexFrom += start.length();
|
||||
indexTo += to.length();
|
||||
return src.substring(indexFrom, indexTo);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user