From 774651dd105f8c82fb92b67c0b473399d8ac79cd Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 4 May 2017 14:54:28 +0200 Subject: [PATCH] Added upperCase, lowerCase methods in StringsUtils. --- .../devinsy/util/strings/StringstUtils.java | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/util/strings/StringstUtils.java b/src/fr/devinsy/util/strings/StringstUtils.java index 4f9c24a..cffed78 100644 --- a/src/fr/devinsy/util/strings/StringstUtils.java +++ b/src/fr/devinsy/util/strings/StringstUtils.java @@ -53,8 +53,8 @@ public class StringstUtils /** * Capitalize. * - * @param source - * the source + * @param sourceStringUtils + * .lo the source */ public static void capitalize(final StringList source) { @@ -590,6 +590,40 @@ public class StringstUtils return result; } + /** + * Lower case. + * + * @param source + * the source + */ + public static void lowerCase(final StringList source) + { + if (source != null) + { + for (int index = 0; index < source.size(); index++) + { + source.set(index, StringUtils.lowerCase(source.get(index))); + } + } + } + + /** + * Lower case. + * + * @param source + * the source + */ + public static void lowerCase(final StringSet source) + { + if (source != null) + { + StringList values = new StringList(source); + lowerCase(values); + source.clear(); + source.addAll(values); + } + } + /** * Read. * @@ -1303,4 +1337,32 @@ public class StringstUtils // return result; } + + /** + * Upper case. + * + * @param source + * the source + */ + public static void upperCase(final StringList source) + { + if (source != null) + { + for (int index = 0; index < source.size(); index++) + { + source.set(index, StringUtils.upperCase(source.get(index))); + } + } + } + + public static void upperCase(final StringSet source) + { + if (source != null) + { + StringList values = new StringList(source); + upperCase(values); + source.clear(); + source.addAll(values); + } + } }