public function replace($pattern, $string)
    {
        self::mustBeString($pattern, 'Pattern');
        self::mustBeString($string, 'Replacement string');

        return new S(preg_replace($pattern, $string, $this->value));
    }