string.substringAfter

This function returns the string that follows the first occurrence of the second argument.

Syntax

string.substringAfter(str, afterstr)

Arguments

Argument

Type

Description

str

string

Source string

afterstr

string

Characters after the first occurrence of this string need to be returned

Returns

Type

Description

string

  • String that follows after the first occurrence of the second string.

  • Zero length string if the first string does not contain the second string.

Examples

The function string.substringAfter("1999/04/01", "/") returns 04/01.