textBeforeForList

Modified on Fri, 18 Aug 2023

Description

Extract the text before a specified substring in each string of a list

Syntax

textBeforeForList(array, substring)

Parameters

Input ParameterTypeDescription
arrayArrayThe list of input strings to search within
substringstringThe substring to find and extract text before

Return value

Type
Array<any>

Sample

ExampleResultDescription
textBeforeForList(['1234$', '12.34$', '1234abc'], '$')['1234', '12.34', '']The list of text before the specified substring for string list

To view all the List functions, click here.

See Also