.. include:: /Includes.rst.txt .. _typo3-fluid-format-trim: ======================================== format.trim ViewHelper `` ======================================== This ViewHelper strips whitespace (or other characters) from the beginning and end of a string. Possible sides are: ``both`` (default) Strip whitespace (or other characters) from the beginning and end of a string ``left`` or ``start`` Strip whitespace (or other characters) from the beginning of a string ``right`` or ``end`` Strip whitespace (or other characters) from the end of a string Examples ======== Defaults -------- :: # String to be trimmed. # .. code-block:: text #String to be trimmed.# Trim only one side ------------------ :: # String to be trimmed. # .. code-block:: text # String to be trimmed.# Trim special characters ----------------------- :: # String to be trimmed. # .. code-block:: text #ring to be trimmed# .. _typo3-fluid-format-trim_arguments: Arguments ========= .. _format.trim_value: value ----- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` The string value to be trimmed. If not given, the evaluated child nodes will be used. .. _format.trim_characters: characters ---------- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Optionally, the stripped characters can also be specified using the characters parameter. Simply list all characters that you want to be stripped. With .. you can specify a range of characters. .. _format.trim_side: side ---- :aspect:`DataType` string :aspect:`Default` 'both' :aspect:`Required` false :aspect:`Description` The side to apply, must be one of this' CASE_* constants. Defaults to both application.