static boolean validateIPv4(String str, int off) {
        if (str == null) {
            return false;
        }

        int strlen = str.length();
        {
            final int len = strlen - off;
            if (len < 7 || len > 25) {
                return false;
            }
        }

        int start = off;
        int dotCount = 0;
        for (int i = off; i < strlen; i++) {
            char ch = str.charAt(i);
            if (ch == '.' || i == strlen - 1) {
                int end = ch == '.' ? i : i + 1;
                int n = end - start;

                char c0, c1, c2;
                switch (n) {
                    case 1:
                        c0 = str.charAt(end - 1);
                        if (c0 < '0' || c0 > '9') {
                            return false;
                        }
                        break;
                    case 2:
                        c0 = str.charAt(end - 2);
                        c1 = str.charAt(end - 1);

                        if (c0 < '0' || c0 > '9') {
                            return false;
                        }
                        if (c1 < '0' || c1 > '9') {
                            return false;
                        }
                        break;
                    case 3:
                        c0 = str.charAt(end - 3);
                        c1 = str.charAt(end - 2);
                        c2 = str.charAt(end - 1);

                        if (c0 < '0' || c0 > '2') {
                            return false;
                        }
                        if (c1 < '0' || c1 > '9') {
                            return false;
                        }
                        if (c2 < '0' || c2 > '9') {
                            return false;
                        }
                        int value = (c0 - '0') * 100 + (c1 - '0') * 10 + (c2 - '0');
                        if (value > 255) {
                            return false;
                        }
                        break;
                    default:
                        return false;
                }

                if (ch == '.') {
                    dotCount++;
                    start = i + 1;
                }
            }
        }

        return dotCount == 3;
    }
decimal is integer, check has non-zero small

@param decimal
@return
core/src/main/java/com/alibaba/fastjson2/util/TypeUtils.java