Feature: #99285 - Add Fluid TrimViewHelper
See forge#99285
Description
A trim ViewHelper to trim strings is now available.
Possible sides are:
both
Strip whitespace (or other characters) from the beginning and end of a stringleft
Strip whitespace (or other characters) from the beginning of a stringright
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>#
Copied!
Results in the output:
#String to be trimmed.#
Copied!
Trim only one side
#<f:format.trim side="right"> String to be trimmed. </f:format.trim>#
Copied!
Results in the output:
# String to be trimmed.#
Copied!
Trim special characters
#<f:format.trim characters=" St."> String to be trimmed. </f:format.trim>#
Copied!
Results in the output:
#ring to be trimmed#
Copied!
Impact
The new ViewHelper can be used in all new projects. There is no interference with any part of existing code.