Adsense

Java Compares two Strings

import org.apache.commons.lang3.StringUtils; 


System.err.println("String diff is="+StringUtils.difference(string1, string2));





StringUtils.difference(null, null) = null
StringUtils.difference("", "") = ""
StringUtils.difference("abc", "") = ""
StringUtils.difference("", "abc") = "abc"
StringUtils.difference("ab", "abxyz") = "xyz"
StringUtils.difference("abc", "abc") = ""
StringUtils.difference("abcde", "xyz") = "xyz"
StringUtils.difference("abcde", "abxyz") = "xyz"

No comments:

Post a Comment

comment here

newest questions on wordpress