Breadcrumbs

substringBefore() Operation

Syntax

set aSubstring = aString.substringBefore(searchString)
set aSubstring = substringBefore(LITERAL, searchString)

Semantics

Returns the substring of aString before the first occurrence of searchString. Raises an error if the search string is not found.

Substitutables

aString, searchString

Can be any variable or object attribute having the type String.  

LITERAL

String literal.

Examples

set aSubstring = s1.substringBefore ("world");
📗