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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4
    • 2.5
    • lang.*
    • 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

            Unassigned Unassigned
            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