com.univocity.parsers.conversions
Class TrimConversion
java.lang.Object
com.univocity.parsers.conversions.TrimConversion
- All Implemented Interfaces:
- Conversion<String,String>
public class TrimConversion
- extends Object
- implements Conversion<String,String>
Removes leading and trailing white spaces from an input String
The revert(String)
implements the same behavior of execute(String)
. Null inputs produce null outputs.
- Author:
- uniVocity Software Pty Ltd - [email protected]
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrimConversion
public TrimConversion()
execute
public String execute(String input)
- Removes leading and trailing white spaces from the input and returns the result.
Equivalent to
revert(String)
- Specified by:
execute
in interface Conversion<String,String>
- Parameters:
input
- the String to be trimmed
- Returns:
- the input String without leading and trailing white spaces, or null if the input is null.
revert
public String revert(String input)
- Removes leading and trailing white spaces from the input and returns the result.
Equivalent to
execute(String)
- Specified by:
revert
in interface Conversion<String,String>
- Parameters:
input
- the String to be trimmed
- Returns:
- the input String without leading and trailing white spaces, or null if the input is null.
Copyright © 2014 uniVocity Software Pty Ltd. All rights reserved.