KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Utility method for trimming leading and trailing spaces from a given text value
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: October 3, 2022

The following is a utility method that removes all leading and trailing space characters from any text value.

// Method: trimLeadingAndTrailingSpaces
#DECLARE($input_t : Text)->$output_t : Text
$output_t:=Split string($input_t; "\r"; sk trim spaces).join("\r")