Skip to main content Skip to complementary content

subStringBefore

Returns the part of a string that precedes a given value.

Information noteNote: This feature is only available in Talend Cloud Pipeline Designer and Talend Data Mapper.

The substring returned is the part of the first argument that precedes the first occurrence of the second argument.

If one of the arguments is an empty string or if the second argument is not found in the first argument, the function returns an empty string.

Arguments

  1. Input string.
  2. Substring of the input string.

Examples

Expression Result
subStringBefore("Hello World", "l") "He"
subStringBefore("", "l") ""
subStringBefore("Hello World", "") ""
subStringBefore("Hello World", "v") ""

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!