Commons Lang
  1. Commons Lang
  2. LANG-687

Convert more of the StringUtils API to take CharSequence

    Details

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

      Description

      Use CharSequence and not String in the StringUtils API for non-mutating operations.

      Anything which has to choose between the mutable and immutable nature of CharSequence subclasses (i.e. takes a String and returns a String), should not be changed. Anything that does not mutate the input (even in spirit) should use CharSequence.

      Additionally there should be a unit test that uses reflection to confirm this rule is in place.

      Listing remaining methods to move to CharSequence:

      public static boolean equalsIgnoreCase(String str1, String str2) {
      public static int ordinalIndexOf(String str, String searchStr, int ordinal) {
      public static int indexOfIgnoreCase(String str, String searchStr) {
      public static int indexOfIgnoreCase(String str, String searchStr, int startPos) {
      public static int lastOrdinalIndexOf(String str, String searchStr, int ordinal) {
      public static int lastIndexOfIgnoreCase(String str, String searchStr) {
      public static int lastIndexOfIgnoreCase(String str, String searchStr, int startPos) {
      public static boolean containsIgnoreCase(String str, String searchStr) {
      public static int countMatches(String str, String sub) {
      public static boolean startsWith(String str, String prefix) {
      public static boolean startsWithIgnoreCase(String str, String prefix) {
      public static boolean startsWithAny(String string, String... searchStrings) {
      public static boolean endsWith(String str, String suffix) {
      public static boolean endsWithIgnoreCase(String str, String suffix) {
      public static boolean endsWithAny(String string, String... searchStrings) {

        Issue Links

          Activity

          Henri Yandell made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Henri Yandell made changes -
          Resolution Won't Fix [ 2 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          [DONE] contains
          [DONE] containsAny
          containsIgnoreCase
          [DONE] containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          [DONE] indexOf
          [DONE] indexOfAny
          [DONE] indexOfAnyBut
          indexOfIgnoreCase
          join
          [DONE] lastIndexOf
          [DONE] lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          [DONE] substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Use CharSequence and not String in the StringUtils API for non-mutating operations.

          Anything which has to choose between the mutable and immutable nature of CharSequence subclasses (i.e. takes a String and returns a String), should not be changed. Anything that does not mutate the input (even in spirit) should use CharSequence.

          Additionally there should be a unit test that uses reflection to confirm this rule is in place.

          Listing remaining methods to move to CharSequence:

              public static boolean equalsIgnoreCase(String str1, String str2) {
              public static int ordinalIndexOf(String str, String searchStr, int ordinal) {
              public static int indexOfIgnoreCase(String str, String searchStr) {
              public static int indexOfIgnoreCase(String str, String searchStr, int startPos) {
              public static int lastOrdinalIndexOf(String str, String searchStr, int ordinal) {
              public static int lastIndexOfIgnoreCase(String str, String searchStr) {
              public static int lastIndexOfIgnoreCase(String str, String searchStr, int startPos) {
              public static boolean containsIgnoreCase(String str, String searchStr) {
              public static int countMatches(String str, String sub) {
              public static boolean startsWith(String str, String prefix) {
              public static boolean startsWithIgnoreCase(String str, String prefix) {
              public static boolean startsWithAny(String string, String... searchStrings) {
              public static boolean endsWith(String str, String suffix) {
              public static boolean endsWithIgnoreCase(String str, String suffix) {
              public static boolean endsWithAny(String string, String... searchStrings) {
          Henri Yandell made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          [DONE] indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          [DONE] contains
          [DONE] containsAny
          containsIgnoreCase
          [DONE] containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          [DONE] indexOf
          [DONE] indexOfAny
          [DONE] indexOfAnyBut
          indexOfIgnoreCase
          join
          [DONE] lastIndexOf
          [DONE] lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          [DONE] substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          [SOME] indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          [DONE] indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          [SOME] indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. I'll update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. Let's update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. I'll update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          left
          leftPad
          lowerCase
          mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          right
          rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          swapCase
          trim
          trimToEmpty
          trimToNull
          upperCase
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. I'll update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          [DONE] center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          [DONE] left
          [DONE] leftPad
          [DONE] lowerCase
          [DONE] mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          [DONE] right
          [DONE] rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          [DONE] swapCase
          trim
          trimToEmpty
          trimToNull
          [DONE] upperCase
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of methods that don't take CharSequence. I'll update the description in place to show status.
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of unique method names that don't take CharSequence. I'll update the description in place to show status.

          [DONE] abbreviate
          [DONE] abbreviateMiddle
          center
          chomp
          chop
          contains
          containsAny
          containsIgnoreCase
          containsWhitespace
          countMatches
          defaultString
          deleteWhitespace
          difference
          endsWith
          endsWithAny
          endsWithIgnoreCase
          equalsIgnoreCase
          getCommonPrefix
          indexOf
          indexOfAny
          indexOfAnyBut
          indexOfIgnoreCase
          join
          lastIndexOf
          lastIndexOfAny
          lastIndexOfIgnoreCase
          lastOrdinalIndexOf
          left
          leftPad
          lowerCase
          mid
          normalizeSpace
          ordinalIndexOf
          overlay
          remove
          removeEnd
          removeEndIgnoreCase
          removeStart
          removeStartIgnoreCase
          repeat
          replace
          replaceChars
          replaceEach
          replaceEachRepeatedly
          replaceOnce
          reverse
          reverseDelimited
          right
          rightPad
          split
          splitByCharacterType
          splitByCharacterTypeCamelCase
          splitByWholeSeparator
          splitByWholeSeparatorPreserveAllTokens
          splitPreserveAllTokens
          startsWith
          startsWithAny
          startsWithIgnoreCase
          strip
          stripAll
          stripEnd
          stripStart
          stripToEmpty
          stripToNull
          substring
          substringAfter
          substringAfterLast
          substringBefore
          substringBeforeLast
          substringBetween
          substringsBetween
          swapCase
          trim
          trimToEmpty
          trimToNull
          upperCase
          Henri Yandell made changes -
          Description Wherever possible, use CharSequence and not String in the StringUtils API.

          substring can go to subSequence inside code. The general substring method can be replaced with a subSequence method and substring deprecated(?). One question is whether to implement a CharSequence.indexOf type method. Given that it's merely a walking method(?!?), this might be quite handy and would allow a bunch of StringUtils methods to move over.
          Wherever possible, use CharSequence and not String in the StringUtils API.

          Here is the working list of methods that don't take CharSequence. I'll update the description in place to show status.
          Henri Yandell made changes -
          Field Original Value New Value
          Link This issue is a clone of LANG-510 [ LANG-510 ]
          Henri Yandell created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Henri Yandell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development