CHECKS IF A STRING ENDS WITH ANY ONE OF THE PROVIDED STRINGS

Checks whether a given string (haystack) ends with any one of several candidate suffixes supplied as a single delimited string (needle). Use this worker whenever you need a multi-suffix “ends-with” test without writing custom branching logic.

When to use

Classification: process.

Tagged: ends_with, match, scalar, string, suffix, text, transformation.

Inputs

Label ID Type Default Required Description
Haystack haystack scalar The full string to test (e.g. a filename, URL, or label); the worker checks whether this value ends with any of the provided suffixes.
Needle needle scalar One or more suffix candidates to match against, combined into a single string and separated by the chosen delimiter (e.g. ‘.csv/.txt/.dat’).
Delimiter delimiter scalar The character or substring used to split the needle string into individual suffixes (e.g. ‘/’ or ‘,’); must not appear inside any individual suffix.

Outputs

Label ID Type Description
string_ends_with_any_one_output_1 string_ends_with_any_one_output_1 scalar Boolean-like scalar result (true/false or 1/0) indicating whether the haystack string ends with at least one of the specified needle suffixes.

Disciplines

  • data.dataset.transform

Runnable example

A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=string_ends_with_any_one


Auto-generated from transformation schema. Worker id: string_ends_with_any_one. Schema hash: 03728599eebe. Hand-curated docs in workerexamples/ override this page when present.