Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

<trim>

Sub-option of <normalize>. If "yes", all specified leading and trailing characters are automatically trimmed from the file paths. Defaults to "no". When "yes", then by default, all whitespace characters will be trimmed. This can be customized using the following attribute:

  • <trim set> - Customizes which character types will be trimmed. Defaults to <trim set=" \t\n\r\f\v">, which trims the following list of whitespace character types:
    • (' ') - Space
    • '\t' - Tab
    • '\n' - Newline
    • '\r' - Carriage return
    • '\f' - Formfeed
    • '\v' - Vertical tab

Examples

Example of trimming standard whitespace:

  • <normalize><trim/></normalize>
    • Input: " \t my-file.txt \n"
    • Output: "my-file.txt"

Example of custom trimming (periods and underscores):

  • <normalize><trim set="._"/></normalize>
    • Input: ".my-file.txt_"
    • Output: "my-file.txt"

TOCIndex