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

Some StringUtils methods should take an int character instead of char to use String API features.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 3.0
    • Component/s: lang.*
    • Labels:
      None
    • Environment:

      Description

      Change the APIs from char to int character input to match underlying JRE API called. There is no need to narrow the input type argument to the JRE, in fact this causes us to loose support for Unicode supplementary characters. The APIs changed are:

      • indexOf(String, char) -> indexOf(String, int)
      • indexOf(String, char, int) -> indexOf(String, int, int)
      • lastIndexOf(String, char) -> lastIndexOf(String, int)
      • lastIndexOf(String, char, int) -> lastIndexOf(String, int, int)
      • contains(String, char) -> contains(String, int)

      The matches methods like String#indexOf(int)

        Attachments

          Activity

            People

            • Assignee:
              ggregory Gary D. Gregory
              Reporter:
              ggregory Gary D. Gregory
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: