code: public final int strByteLengthNull(byte[]bytes, int p, int end) {
          int p_, start;
          p_ = start = 0;
  
          while (true) {
              if (bytes[p_] == 0) {
                  int len = minLength();
                  if (len == 1) return p_ - start;
                  int q = p_ + 1;
                  while (len > 1) {
                      if (q >= bytes.length) return p_ - start;
                      if (bytes[q] != 0) break;
                      q++;
                      len--;
                  }
                  if (len == 1) return p_ - start;
              }
              p_ += length(bytes, p_, end);
          }
      }
docs: /* onigenc_str_bytelen_null