chore: style changes

This commit is contained in:
Nuno Maduro
2023-01-11 20:11:36 +00:00
parent 0675529320
commit 349e2f45df
14 changed files with 78 additions and 40 deletions

View File

@ -77,6 +77,9 @@ final class Str
return substr($subject, 0, $pos);
}
/**
* Returns the content after the given "search".
*/
public static function after(string $subject, string $search): string
{
return $search === '' ? $subject : array_reverse(explode($search, $subject, 2))[0];