@tempots/std

substringAfterLast() function

substringAfterLast searches for the last occurrance of searchFor and returns the text after that. If searchFor is not found, an empty string is returned.

Signature:

substringAfterLast: (value: string, searchFor: string) => string

Parameters

Parameter

Type

Description

value

string

The string to search in.

searchFor

string

The string to search for.

Returns: string

The text after the last occurrance of searchFor or an empty string if searchFor is not found.