mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-28 11:53:44 +00:00
Added support for collapseWhitespace function
This commit is contained in:
@@ -66,6 +66,16 @@ char[] result = chars(title);
|
||||
```
|
||||
|
||||
|
||||
## collapseWhitespace(value)
|
||||
|
||||
Replace consecutive whitespace characters with a single space.
|
||||
|
||||
```java
|
||||
final String input = " foo bar ";
|
||||
final String result = collapseWhitespace(title);
|
||||
// result = "foo bar";
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Other functions that can be added
|
||||
|
||||
Reference in New Issue
Block a user