MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / getURLHost

Method getURLHost

CodenameOne/src/com/codename1/io/Util.java:1583–1591  ·  view source on GitHub ↗
(String url)

Source from the content-addressed store, hash-verified

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 ///

Callers 2

relativeToAbsoluteMethod · 0.95
invokeStatic16Method · 0.80

Calls 2

indexOfMethod · 0.65
substringMethod · 0.65

Tested by

no test coverage detected