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>#
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.