mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-20 14:34:04 +00:00
Fixed #22. Added support for removeSpaces function
This commit is contained in:
@@ -733,6 +733,17 @@ public abstract class Strman {
|
||||
return endsWith(value, suffix, caseSensitive) ? value.substring(0, value.toLowerCase().lastIndexOf(suffix.toLowerCase())) : value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all spaces and replace for value.
|
||||
*
|
||||
* @param value The input String
|
||||
* @return String without spaces
|
||||
*/
|
||||
public static String removeSpaces(final String value) {
|
||||
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
|
||||
return value.replaceAll("\\s", "");
|
||||
}
|
||||
|
||||
public static String decode(final String value, final int digits, final int radix) {
|
||||
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
|
||||
return Arrays
|
||||
|
||||
Reference in New Issue
Block a user