spring-framework / org.springframework.beans.propertyeditors / StringTrimmerEditor

StringTrimmerEditor

open class StringTrimmerEditor : PropertyEditorSupport

Property editor that trims Strings.

Optionally allows transforming an empty string into a null value. Needs to be explicitly registered, e.g. for command binding.

Author
Juergen Hoeller

See Also
org.springframework.validation.DataBinder#registerCustomEditor

Constructors

<init>

StringTrimmerEditor(emptyAsNull: Boolean)
StringTrimmerEditor(charsToDelete: String, emptyAsNull: Boolean)

Create a new StringTrimmerEditor.

Functions

getAsText

open fun getAsText(): String

setAsText

open fun setAsText(text: String): Unit