@Test public void removeTail32Test() { assertEquals("1.1.1.1", removeTail32("1.1.1.1/32")); assertEquals("113.12.83.4", removeTail32("113.12.83.4/32")); }
public static String removeTail32(String ip) { return isNotEmpty(ip) && ip.endsWith("/32") ? ip.substring(0, ip.length() - REMOVE_TAIL_LENGTH) : ip; }
IpUtils { public static String removeTail32(String ip) { return isNotEmpty(ip) && ip.endsWith("/32") ? ip.substring(0, ip.length() - REMOVE_TAIL_LENGTH) : ip; } }
IpUtils { public static String removeTail32(String ip) { return isNotEmpty(ip) && ip.endsWith("/32") ? ip.substring(0, ip.length() - REMOVE_TAIL_LENGTH) : ip; } private  IpUtils(); }
IpUtils { public static String removeTail32(String ip) { return isNotEmpty(ip) && ip.endsWith("/32") ? ip.substring(0, ip.length() - REMOVE_TAIL_LENGTH) : ip; } private  IpUtils(); static boolean checkValid(final String ip); static boolean checkValid2(final String ip); static boolean checkValidV6(final String ip); static String removeTail32(String ip); static String extractDomain(String url); static String getTailFromURL(String url); static long ip2long(String ipAddress); static String long2ip(Long ipAddress); static Integer ip2int(String ipAddress); static Boolean checkIPRange(final String ipAddress, final String range); static String getIPFromURL(String url); static Boolean isReachable(final String ipAddress); static boolean ping(final String ipAddress); static List<String> getCurrentEnvironmentNetworkIps(); }
IpUtils { public static String removeTail32(String ip) { return isNotEmpty(ip) && ip.endsWith("/32") ? ip.substring(0, ip.length() - REMOVE_TAIL_LENGTH) : ip; } private  IpUtils(); static boolean checkValid(final String ip); static boolean checkValid2(final String ip); static boolean checkValidV6(final String ip); static String removeTail32(String ip); static String extractDomain(String url); static String getTailFromURL(String url); static long ip2long(String ipAddress); static String long2ip(Long ipAddress); static Integer ip2int(String ipAddress); static Boolean checkIPRange(final String ipAddress, final String range); static String getIPFromURL(String url); static Boolean isReachable(final String ipAddress); static boolean ping(final String ipAddress); static List<String> getCurrentEnvironmentNetworkIps();  }