String.substringAfter()

Signature

String substringAfter (String s1, String s2)

Domain

ACTION, CONDITION, QUERY

Description

Returns the substring of the first parameter string s1 that precedes the first occurence of the second parameter string s2 in the first parameter sting s1 or null if the first parameter string s1 does not contain the second parameter string s2

Parameters

NameTypeDescription
s1StringA String to test.
s2StringA String to search for in String s1.

Returns

TypeDescription
StringThe result String.

Cautions

none

Example

int result = String.substringAfter("This is a test. This is a test.", "is ");

Result is: "is a test. This is a test."