protected function splitText($part)
    {
        if ($part === 'before' || $part === 'rest')
        {
            $parts = explode(static::separator, $this->text);

            if (count($parts) === 1 && $part === 'rest')
            {
                return null;
            }

            return ($part === 'before') ? current($parts) : end($parts);
        }

        return str_replace(static::separator, '', $this->text);
    }