textBefore
Modified on Wed, 16 Aug 2023
Description
Extract the text before a specified substring in a string
Syntax
textBefore(input, substring)
Parameters
Input Parameter | Type | Description |
---|---|---|
input | string | The input string to search within |
substring | string | The substring to find and extract text before |
Return value
Type |
---|
string |
Sample
Example | Result | Description |
---|---|---|
textBefore('1234 Invoice Number', ' Invoice') | '1234' | The text before the specified substring |
textBefore('1234$', ' Invoice') | '' | Return empty string if substring is not found |
To view all the String functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article