- 10 Feb 2025
-
DarkLight
-
PDF
trimStart
- Updated on 10 Feb 2025
-
DarkLight
-
PDF
Task Purpose
The trimStart
task is used to remove 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, then use the trimStart
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 |
---|---|---|
trimmedStart |
String | A 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 ending of the words.
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.
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.
The trimmedStart
variable upon output will be "Hello World" and the whitespace before the word "Hello" has been removed.