in spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java [353:391]
private boolean dashIgnoringElementEquals(Elements e1, Elements e2, int i) {
int l1 = e1.getLength(i);
int l2 = e2.getLength(i);
int i1 = 0;
int i2 = 0;
while (i1 < l1) {
if (i2 >= l2) {
return false;
}
char ch1 = e1.charAt(i, i1);
char ch2 = e2.charAt(i, i2);
if (ch1 == '-') {
i1++;
}
else if (ch2 == '-') {
i2++;
}
else if (ch1 != ch2) {
return false;
}
else {
i1++;
i2++;
}
}
if (i2 < l2) {
if (e2.getType(i).isIndexed()) {
return false;
}
do {
char ch2 = e2.charAt(i, i2++);
if (ch2 != '-') {
return false;
}
}
while (i2 < l2);
}
return true;
}