Trim suffix from string
Description
This operation removes a specified suffix from the end of a string. If the input string ends with the given suffix, it is removed; otherwise, the string is returned unchanged.
This operation is useful for cleaning up text by eliminating known trailing substrings, such as file extensions, fixed markers, or punctuation.
Data types
These are the input/output expected data types for this operation:
Input data
- Strings to be trimmed.
Output data
- The resulting string after removing the specified suffix.
Parameters
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Example
Suppose you want to trim your input strings by removing a specific suffix:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Trim suffix from string.
Set Suffix to trim to
.txt
.Give your Output field a name and click Save. The input strings will be trimmed, removing the specified suffix.
For example:
"report_final.txt" -> "report_final"
Last updated
Was this helpful?