(String ip)
| 204 | } |
| 205 | |
| 206 | public static String ipClean(String ip){ |
| 207 | ip = ip.trim(); |
| 208 | if (ip.endsWith(".")){ |
| 209 | ip = ip.substring(0,ip.lastIndexOf(".")); |
| 210 | } |
| 211 | if (ip.contains(":")) { |
| 212 | ip = ip.substring(0,ip.lastIndexOf(":")); |
| 213 | } |
| 214 | return ip; |
| 215 | } |
| 216 | |
| 217 | /* |
| 218 | * 多个网段转IP集合,变更表现形式,变成一个个的IP |
no outgoing calls
no test coverage detected