trimEnd
  • 23 May 2023
  • Dark
    Light
  • PDF

trimEnd

  • Dark
    Light
  • PDF

Article summary

trimEnd Task Purpose

The trimEnd task is used to remove whitespace at the end of a string. Whitespace can include spaces and tabs.

Potential Use Case

If you want to make sure that no spaces are left at the end of any datasets in a string entry, then you would use the trimEnd task to find and remove them.

Properties

Input and output parameters are shown below.

Incoming Type Description
str String Required. The string to remove whitespace from.


Outgoing Type Description
trimmedEnd String A new string stripped of whitespace from its (right) end.

Example

In this IAP example:

  • A New Job Variable task is used to input the data into the trimEnd task. The New Variable Name is String and the input Value is Hello World, with spaces at the beginning and end of the words.

    trimEnd-01

  • Next the trimEnd task is used to reference New Variable: String within the Reference task. The Reference variable is automatically set to accept the value from the task being used as an input.

    trimEnd-02

  • After running the job, notice that the incoming variable in Task History has spaces before and after the words Hello World. This is notated by the placement of the quotations.

    trimEnd-03

  • The outgoing variable that is produced will be "Hello World" and the whitespace after the word World has been removed.

    trimEnd-04


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.