【update】注释更新

This commit is contained in:
mzc5649
2021-04-02 04:26:50 +08:00
parent 9d2260395e
commit 0bd6543409
@@ -314,14 +314,14 @@ public class BaseCodeGenerate {
boolean flag2 = true;
do {
// 若第一个分隔符位于第一位,长度加一位
// 若第一个分隔符位于第一位,长度截取加一位
int start = templateUrl.indexOf(separator) == 0 ? 1 : 0;
// 若最后的分隔符位置为最后一位,长度截取到前一位
int end = templateUrl.lastIndexOf(separator) + 1 == templateUrl.length() ? templateUrl.lastIndexOf(separator) : templateUrl.length();
templateUrl = templateUrl.substring(start, end);
// 开头是否为分隔符
// 开头是否为分隔符,若是则为true
flag1 = templateUrl.indexOf(separator) == 0;
// 结尾是否为分隔符
// 结尾是否为分隔符,若是则为true
flag2 = templateUrl.lastIndexOf(separator) + 1 == templateUrl.length();
} while(flag1 || flag2);