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

StringUtils.equalsIgnoreSurroundingSpace

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • None
    • None
    • lang.*
    • None

    Description

      Convenience method of StringUtils.equals("abc ".trim()," abc".trim()). Often we need to trim before we do equals.

      StringUtils. equalsIgnoreSurroundingSpace(null, null) = true
      StringUtils. equalsIgnoreSurroundingSpace(null, "abc") = false
      StringUtils. equalsIgnoreSurroundingSpace("abc", null) = false
      StringUtils. equalsIgnoreSurroundingSpace("abc", "abc") = true
      StringUtils. equalsIgnoreSurroundingSpace("abc", "ABC") = true
      StringUtils.equalsIgnoreSurroundingSpace("abc "," abc") = true

      Attachments

        Activity

          People

            Unassigned Unassigned
            _akilan akilan i
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: