Index: libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
index 93611101a97382b42a3dc8f75e682bc741c5a103..79c5a8692c40a6fda04d6e9c7d88b7034c846ec2 100644 |
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
@@ -136,4 +136,14 @@ public final class Utils |
} |
} |
} |
+ |
+ public static String getUrlWithoutParams(String urlWithParams) |
+ { |
+ if (urlWithParams == null) { |
+ throw new IllegalArgumentException("URL can't be null"); |
+ } |
+ |
+ int pos = urlWithParams.indexOf("?"); |
+ return (pos >= 0 ? urlWithParams.substring(0, pos) : urlWithParams); |
+ } |
} |