str::after() with not-found needle omits first char
sebsel opened this issue · 1 comments
sebsel commented
So I had the following:
echo str::after('string', '.');
// tring
Maybe add a if (!$pos) return $string
?
public static function after($string, $char) {
$pos = strpos($string, $char);
return static::substr($string, $pos+1);
}
bastianallgeier commented
This is now fixed on the develop branch.