
com.hubspot.jinjava.util.CharArrayUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jinjava Show documentation
Show all versions of jinjava Show documentation
Jinja templating engine implemented in Java
package com.hubspot.jinjava.util;
public class CharArrayUtils {
public static boolean charArrayRegionMatches(
char[] value,
int startPos,
CharSequence toMatch
) {
int matchLen = toMatch.length(), endPos = startPos + matchLen;
if (endPos > value.length) {
return false;
}
for (int matchIndex = 0, i = startPos; i < endPos; i++, matchIndex++) {
if (value[i] != toMatch.charAt(matchIndex)) {
return false;
}
}
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy