Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-471

I would like to add isLowerCase and isUpperCase methods to WordUtils in the commons.lang package

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: lang.*
    • Labels:
      None

      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;
      }

        Attachments

        1. LANG-471.patch
          4 kB
          Vincent Ricard

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mindjoy Ivica Mikic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified