Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-04-30 16:32:42 +0000
committermkuppe2008-04-30 16:32:42 +0000
commit13672d38e89d5a43b7f9197f866e7598c69a966d (patch)
tree077556bfd54a2c3eb9d7683578368ba3ed2e3ebc
parent704eb346b0b0bffbf2718244fdb6a3fe2fe08f4d (diff)
downloadorg.eclipse.ecf-13672d38e89d5a43b7f9197f866e7598c69a966d.tar.gz
org.eclipse.ecf-13672d38e89d5a43b7f9197f866e7598c69a966d.tar.xz
org.eclipse.ecf-13672d38e89d5a43b7f9197f866e7598c69a966d.zip
FIXED - bug 228876: [Discovery][jSLP] org.eclipse.ecf.provider.jslp.container.JSLPServiceInfo.getServiceURL() needs to remove "IANA" itself
https://bugs.eclipse.org/bugs/show_bug.cgi?id=228876
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java
index 939c61d04..c9c09a179 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java
@@ -233,4 +233,14 @@ public final class StringUtils {
return string;
return string.substring(0, index) + replace + replaceAll(string.substring(index + target.length()), target, replace);
}
+
+ /**
+ * @see StringUtils#replaceAll(String, String, String) but case insensitive
+ */
+ public static String replaceAllIgnoreCase(String string, String target, String replace) {
+ final int index = string.toLowerCase().indexOf(target.toLowerCase());
+ if (index == -1)
+ return string;
+ return string.substring(0, index) + replace + replaceAllIgnoreCase(string.substring(index + target.length()), target, replace);
+ }
}

Back to the top