Fixed #6. Added support for inequal function

This commit is contained in:
Shekhar Gulati
2016-05-20 19:35:51 +05:30
parent f4094f8b3f
commit 891389ddfb
2 changed files with 17 additions and 4 deletions
+11 -4
View File
@@ -1,9 +1,6 @@
package strman;
import java.util.Arrays;
import java.util.Base64;
import java.util.Optional;
import java.util.StringJoiner;
import java.util.*;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.regex.Matcher;
@@ -468,6 +465,16 @@ public abstract class Strman {
return value.toLowerCase().indexOf(needle.toLowerCase(), offset);
}
/**
* Tests if two Strings are inequal
* @param first The first String
* @param second The second String
* @return true if first and second are not equal false otherwise
*/
public static boolean inequal(final String first, final String second) {
return !Objects.equals(first, second);
}
public static String leftPad(final String value, final String pad, final int length) {
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);