From 5055b8aa031edbb60fb41d2e2ff7452a2a01d65f Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Thu, 17 Dec 2015 18:20:35 +0100 Subject: [PATCH] kill StringUtils.getHost function --- .../wordpress/android/util/StringUtils.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/StringUtils.java b/WordPressUtils/src/main/java/org/wordpress/android/util/StringUtils.java index 136cc4e541a4..25ddd2a41226 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/StringUtils.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/StringUtils.java @@ -197,24 +197,6 @@ public static String getPhotonUrl(String imageUrl, int size) { return "http://i0.wp.com/" + imageUrl + "?w=" + size; } - public static String getHost(String url) { - if (TextUtils.isEmpty(url)) { - return ""; - } - - int doubleslash = url.indexOf("//"); - if (doubleslash == -1) { - doubleslash = 0; - } else { - doubleslash += 2; - } - - int end = url.indexOf('/', doubleslash); - end = (end >= 0) ? end : url.length(); - - return url.substring(doubleslash, end); - } - public static String replaceUnicodeSurrogateBlocksWithHTMLEntities(final String inputString) { final int length = inputString.length(); StringBuilder out = new StringBuilder(); // Used to hold the output.