Feature: #99285 - Add Fluid TrimViewHelper

See forge#99285

Description

Add a format trim view helper to trim strings.

Possible sides are:

  • both Strip whitespace (or other characters) from the beginning and end of a string

  • left Strip whitespace (or other characters) from the beginning of a string

  • right Strip whitespace (or other characters) from the end of a string

Examples

Trim from both sides

#<f:format.trim>   String to be trimmed.   </f:format.trim>#

Results in the output:

#String to be trimmed.#

Trim only ony side

#<f:format.trim side="right">   String to be trimmed.   </f:format.trim>#

Results in the output:

#   String to be trimmed.#

Trim special characters

#<f:format.trim characters=" St.">   String to be trimmed.   </f:format.trim>#

Results in the output:

#ring to be trimmed#

Impact

The new ViewHelper can be used in all new projects. There is no interference with any part of existing code.