public class TrimConversion extends Object implements Conversion<String,String>
revert(String)
implements the same behavior of execute(String)
. Null inputs produce null outputs.Constructor and Description |
---|
TrimConversion()
Creates a trim conversion that removes leading and trailing whitespaces of any input String.
|
TrimConversion(int length)
Creates a trim-to-length conversion that limits the length of any resulting String.
|
Modifier and Type | Method and Description |
---|---|
String |
execute(String input)
Removes leading and trailing white spaces from the input and returns the result.
|
String |
revert(String input)
Removes leading and trailing white spaces from the input and returns the result.
|
public TrimConversion()
public TrimConversion(int length)
length
- the maximum number of characters of any String returned by this conversion.public String execute(String input)
revert(String)
execute
in interface Conversion<String,String>
input
- the String to be trimmedpublic String revert(String input)
execute(String)
revert
in interface Conversion<String,String>
input
- the String to be trimmedCopyright © 2019 Univocity Software Pty Ltd. All rights reserved.