trimStart

The trimStart task removes whitespace at the beginning of a string.

Potential use case

If you want to make sure no spaces remain at the beginning of any datasets in a string entry, use the trimStart task to find and remove them.

Properties

IncomingTypeDescription
strStringRequired. The string to remove whitespace from.
OutgoingTypeDescription
trimmedStartStringA new string representing the input str stripped of whitespace from its beginning (left end).

Example

In this example, a New Job Variable is used to input data into the trimStart task, and the New Variable Name is “string”. The new variable value is Hello World, with spaces at the beginning and end of the words.

New Variable task configured with value Hello World including leading and trailing spaces

Next, the trimStart task is used to reference New Variable: String within the reference task. The reference value is automatically set to accept the value from the task being used as an input.

trimStart task referencing the New Variable String task

After running the job, notice that the incoming variable has spaces before and after the words Hello World as shown by the placement of the quotation marks.

Incoming variable showing spaces before and after Hello World

The trimmedStart variable upon output will be "Hello World" and the whitespace before the word “Hello” has been removed.

trimStart task output showing Hello World with leading whitespace removed