Added upperCase, lowerCase methods in StringsUtils.

This commit is contained in:
Christian P. MOMON 2017-05-04 14:54:28 +02:00
parent 06cf653dfc
commit 774651dd10

View file

@ -53,8 +53,8 @@ public class StringstUtils
/** /**
* Capitalize. * Capitalize.
* *
* @param source * @param sourceStringUtils
* the source * .lo the source
*/ */
public static void capitalize(final StringList source) public static void capitalize(final StringList source)
{ {
@ -590,6 +590,40 @@ public class StringstUtils
return result; 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. * Read.
* *
@ -1303,4 +1337,32 @@ public class StringstUtils
// //
return result; 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);
}
}
} }