changeset 342:9a85e0ef6e02

StringUtils: Added static method to convert an array of string to their uppercase counterparts. artifacts/trunk@2993 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 17 Oct 2011 15:42:43 +0000
parents e0efa2c28d19
children 542caebea773
files ChangeLog artifacts-common/src/main/java/de/intevation/artifacts/common/utils/StringUtils.java
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 13 12:19:43 2011 +0000
+++ b/ChangeLog	Mon Oct 17 15:42:43 2011 +0000
@@ -1,3 +1,8 @@
+2011-10-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* artifacts-common/src/main/java/de/intevation/artifacts/common/utils/StringUtils.java(toUpperCase):
+	  Added static method to convert an array of string to their uppercase counterparts.
+	  
 2011-10-13	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java:
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/StringUtils.java	Thu Oct 13 12:19:43 2011 +0000
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/StringUtils.java	Mon Oct 17 15:42:43 2011 +0000
@@ -103,5 +103,18 @@
         }
         return sb.toString();
     }
+
+    public static final String [] toUpperCase(String [] s) {
+        if (s == null) {
+            return null;
+        }
+        String [] d = new String[s.length];
+        for (int i = 0; i < s.length; ++i) {
+            if (s[i] != null) {
+                d[i] = s[i].toUpperCase();
+            }
+        }
+        return d;
+    }    
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org