[
https://issues.apache.org/jira/browse/LANG-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivica Mikic updated LANG-471:
-----------------------------
Description:
public static boolean isLowerCase(String s)
{
if (s == null || s.trim().length() == 0) return false;
char[] chars = new char[s.length()];
s.getChars(0, s.length(), chars, 0);
boolean ilc = true;
for (int i = 0; i < chars.length; i++)
{
if (Character.isUpperCase(chars[i]))
{
ilc = false;
break;
}
}
return ilc;
}
public static boolean isUpperCase(String s)
{
if (s == null || s.trim().length() == 0) return false;
char[] chars = new char[s.length()];
s.getChars(0, s.length(), chars, 0);
boolean iuc = true;
for (int i = 0; i < chars.length; i++)
{
if (Character.isLowerCase(chars[i]))
{
iuc = false;
break;
}
}
return iuc;
}
was:
public static boolean isLowerCase(String s)
{
if (s == null || s.trim().length() == 0) return s;
char[] chars = new char[s.length()];
s.getChars(0, s.length(), chars, 0);
boolean ilc = true;
for (int i = 0; i < chars.length; i++)
{
if (Character.isUpperCase(chars[i]))
{
ilc = false;
break;
}
}
return ilc;
}
public static boolean isUpperCase(String s)
{
if (s == null || s.trim().length() == 0) return s;
char[] chars = new char[s.length()];
s.getChars(0, s.length(), chars, 0);
boolean iuc = true;
for (int i = 0; i < chars.length; i++)
{
if (Character.isLowerCase(chars[i]))
{
iuc = false;
break;
}
}
return iuc;
}
> I would like to add isLowerCase and isUpperCase methods to WordUtils in the
> commons.lang package
> ------------------------------------------------------------------------------------------------
>
> Key: LANG-471
> URL: https://issues.apache.org/jira/browse/LANG-471
> Project: Commons Lang
> Issue Type: Improvement
> Affects Versions: 2.4
> Reporter: Ivica Mikic
> Priority: Minor
> Original Estimate: 0.25h
> Remaining Estimate: 0.25h
>
> public static boolean isLowerCase(String s)
> {
> if (s == null || s.trim().length() == 0) return false;
>
> char[] chars = new char[s.length()];
> s.getChars(0, s.length(), chars, 0);
> boolean ilc = true;
> for (int i = 0; i < chars.length; i++)
> {
> if (Character.isUpperCase(chars[i]))
> {
> ilc = false;
> break;
> }
> }
>
> return ilc;
> }
>
>
> public static boolean isUpperCase(String s)
> {
> if (s == null || s.trim().length() == 0) return false;
>
> char[] chars = new char[s.length()];
> s.getChars(0, s.length(), chars, 0);
> boolean iuc = true;
> for (int i = 0; i < chars.length; i++)
> {
> if (Character.isLowerCase(chars[i]))
> {
> iuc = false;
> break;
> }
> }
>
> return iuc;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.