src/Str.php
public function str(string $delimiter): self
    {
        $sub = \mb_strstr($this->value, $delimiter, false, (string) $this->encoding());

        if ($sub === false) {
            throw new SubstringException(\sprintf(
                'Substring "%s" not found',
                $delimiter
            ));
        }

        return new self($sub, $this->encoding);
    }
public function str(string $delimiter): self
    {
        $sub = \mb_strstr($this->value, $delimiter, false, (string) $this->encoding());

        if ($sub === false) {
            throw new SubstringException(\sprintf(
                'Substring "%s" not found',
                $delimiter
            ));
        }

        return new self($sub, $this->encoding);
    }
public function str ( string $ delimiter ) : self { $ sub = \ mb_strstr ( $ this -> value , $ delimiter , false , ( string ) $ this -> encoding ( ) ) ; if ( $ sub === false ) { throw new SubstringException ( \ sprintf ( 'Substring "%s" not found' , $ delimiter ) ) ; } return new self ( $ sub , $ this -> encoding ) ; }
Returns the string following the given delimiter

@param string $delimiter

@throws SubstringException If the string is not found

@return self
Returns the string following the given delimiter