trimEnd

The trimEnd task removes whitespace — including spaces and tabs — from the end of a string.

Potential use case

Use trimEnd to ensure that no trailing spaces remain in string values within a dataset.

Properties

IncomingTypeDescription
strStringRequired. The string to remove trailing whitespace from.
OutgoingTypeDescription
trimmedEndStringA new string with whitespace removed from its right end.

Example

In this example, a newVariable task is used to create the input for trimEnd. The variable name is String and its value is Hello World with spaces at both the beginning and end.

newVariable task setting String to a value with leading and trailing spaces

The trimEnd task references New Variable: String as the reference task. The reference variable is automatically set to accept the value from that task.

trimEnd task with reference task set to the newVariable output

After running the job, the incoming variable in Task History shows spaces before and after Hello World, indicated by the placement of the quotation marks.

Task History incoming variable showing spaces before and after Hello World

The outgoing trimmedEnd value is "Hello World" with the trailing whitespace after World removed.

Outgoing trimmedEnd value with trailing whitespace removed