0

Is there any difference between StringUtills.endWith("str","substr") and str.endWith("substr")?

1
  • 1
    No, they are identical in that neither of them exists. Perhaps you meant endsWith. Also, they will only behave similarly if str has the value "str" Commented Aug 26, 2016 at 5:39

1 Answer 1

3

StringUtils methods are null-safe.

So if str is null you do not get a nullpointerexception if you are using StringUtils.

For more informations see the documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.