private static int findUnescaped(byte[] str, int start, int end) {
        while (start < end) {
            int charIndex = ByteUtil.indexOf(str, '*', start, end);
            if (charIndex == start || charIndex == -1) {
                return charIndex;
            }
            int backSlashCount = 0;
            int backSlashIndex = charIndex - 1;
            while (((backSlashIndex >= start) && (str[backSlashIndex] == '\\'))) {
                backSlashIndex--;
                backSlashCount++;
            }

            if (backSlashCount % 2 == 0) {
                return charIndex;
            }

            // Start the next search after the escaped star.
            start = charIndex + 1;
        }
        return -1;
    }
@author James Chen
@implSpec <a href="https://tools.ietf.org/html/rfc4515"> RFC 4515: String Representation of
          Search Filters</a>
turms-gateway/src/main/java/im/turms/gateway/infra/ldap/element/operation/search/Filter.java