Retrieve the string part before the search match.
The string to search within.
The substring to search for.
The portion of str before the first occurrence of search, or '' if not found.
str
search
''
Retrieve the string part before the search match.