(String url)
| 1581 | /// |
| 1582 | /// the domain of the URL |
| 1583 | public static String getURLHost(String url) { |
| 1584 | int start = url.indexOf("://"); |
| 1585 | int end = url.indexOf('/', start + 3); |
| 1586 | if (end != -1) { |
| 1587 | return url.substring(start + 3, end); |
| 1588 | } else { |
| 1589 | return url.substring(start + 3); |
| 1590 | } |
| 1591 | } |
| 1592 | |
| 1593 | /// Returns the URL's path |
| 1594 | /// |
no test coverage detected