Class TrimRule
java.lang.Object
com.streamconverter.command.rule.impl.string.TrimRule
- All Implemented Interfaces:
IRule
Trims leading and trailing whitespace from strings.
This rule removes whitespace characters from the beginning and end of the input string. Whitespace includes spaces, tabs, newlines, and other Unicode whitespace characters.
Examples:
" hello "
→"hello"
"\t\nworld\r\n"
→"world"
"already trimmed"
→"already trimmed"
Usage:
IRule rule = new TrimRule();
IStreamCommand command = JsonNavigateCommand.create("$.name", rule);
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary