mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-10 06:13:58 +00:00
Fixed #20. Added support for removeNonWords function
This commit is contained in:
@@ -697,6 +697,17 @@ public abstract class Strman {
|
||||
return fx.apply(value.toLowerCase(), prefix.toLowerCase());
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all non word characters.
|
||||
*
|
||||
* @param value The input String
|
||||
* @return String without non-word characters
|
||||
*/
|
||||
public static String removeNonWords(final String value) {
|
||||
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
|
||||
return value.replaceAll("[^\\w]+", "");
|
||||
}
|
||||
|
||||
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