Skip to content

String Operations ​

Performs a variety of text manipulation operations on an input string and returns the result.

Purpose ​

Use String Operations whenever a workflow needs to transform, inspect, or extract part of a text value. Common use cases include normalising casing before a comparison, extracting a file extension from a path, replacing placeholder tokens in a template, splitting a delimited string into an array, or trimming whitespace from user-supplied data.

Inputs ​

FieldTypeRequiredDescription
Input StringTextYesThe text value to operate on.
OperationDropdownYesThe operation to perform. See the Operations table below.
StartIndexTextNoZero-based character position at which to begin extraction. Visible when Operation is Substring.
LengthTextNoNumber of characters to extract. Visible when Operation is Substring.
ValueTextNoThe substring to search for, test, or locate. Visible when Operation is Contains, StartsWith, EndsWith, IndexOf, or LastIndexOf.
OldValueTextNoThe substring to find and replace. Visible when Operation is Replace.
NewValueTextNoThe replacement text. Visible when Operation is Replace.
SeparatorTextNoDelimiter used to split the string or to join path segments. Visible when Operation is Split or GetPathToDepth.
DepthTextNoNumber of path segments to keep from the start of the string. Visible when Operation is GetPathToDepth.
PatternTextNoRegular expression pattern to match. Visible when Operation is RegexReplace.
ReplacementTextNoText to substitute for each regex match. Visible when Operation is RegexReplace.

Visibility Rules ​

StartIndex and Length are visible when Operation is Substring. Value is visible when Operation is Contains, StartsWith, EndsWith, IndexOf, or LastIndexOf. OldValue and NewValue are visible when Operation is Replace. Separator is visible when Operation is Split or GetPathToDepth. Depth is visible when Operation is GetPathToDepth. Pattern and Replacement are visible when Operation is RegexReplace.

Operations ​

OperationDescription
SubstringExtracts a portion of the string starting at StartIndex, optionally limited to Length characters.
ContainsReturns true if the string contains the specified Value.
StartsWithReturns true if the string begins with the specified Value.
EndsWithReturns true if the string ends with the specified Value.
IndexOfReturns the zero-based index of the first occurrence of Value, or -1 if not found.
LastIndexOfReturns the zero-based index of the last occurrence of Value, or -1 if not found.
ToUpperConverts all characters to uppercase.
ToLowerConverts all characters to lowercase.
TrimRemoves leading and trailing whitespace.
TrimStartRemoves leading whitespace only.
TrimEndRemoves trailing whitespace only.
ReplaceReplaces every occurrence of OldValue with NewValue.
SplitSplits the string at each occurrence of Separator and returns an array of substrings.
LengthReturns the number of characters in the string.
RegexReplaceReplaces every substring matching Pattern with Replacement.
GetPathToDepthSplits the string by Separator and returns only the first Depth segments rejoined.

Outputs ​

NameDescription
ResultThe outcome of the operation. The type varies by operation: a string for most transformations, a boolean for Contains / StartsWith / EndsWith, an integer for IndexOf / LastIndexOf / Length, and a list of strings for Split.

Examples ​

Extract a file extension
FieldValue
Input Stringreport_final.pdf
OperationLastIndexOf then Substring

Alternatively use GetPathToDepth with a dot separator to isolate path components.

Split a comma-separated list
FieldValue
Input Stringalice,bob,carol
OperationSplit
Separator,
Result["alice", "bob", "carol"]

Tentech