String.substringAfter()
Signature
substringAfter (String s1, String s2)
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
| Name | Type | Description |
s1 | String | A String to test. |
s2 | String | A String to search for in String s1. |
Returns
| Type | Description |
String | The result String. |
Example
String result = String.substringAfter ("Hello world", "Hel");
Result is:
result "lo world"