Strings.skipUntilAfter()
Syntax
function skipUntilAfter(string: string, substring: string): string
Returns all characters in the string after the first occurrence of the substring.
Parameters | |
string
|
The string to take characters from. |
substring
|
The substring to find within |
Example
import { Strings } from 'potence';
const string = 'https://www.github.com';
Strings.skipUntilAfter(string, '://'); // -> "www.github.com"
Remarks
If the string does not contain the substring, this function returns an empty string.
Contrast Strings.takeUntilAfter()
.
Compare Strings.skipUntil()
,
Strings.skipUntilLast()
,
Strings.skipUntilAfterLast()
,
and Strings.skip()
.