src/Str.php
public function possessive()
    {
        if ($this->string == '') {
            return new static();
        }

        $noApostropheEdgeCases = ['it'];

        if (in_array($this->string, $noApostropheEdgeCases)) {
            return new static($this->string.'s');
        }

        return new static($this->string.'\''.($this->string[strlen($this->string) - 1] != 's' ? 's' : ''));
    }
public function possessive()
    {
        if ($this->string == '') {
            return new static();
        }

        $noApostropheEdgeCases = ['it'];

        if (in_array($this->string, $noApostropheEdgeCases)) {
            return new static($this->string.'s');
        }

        return new static($this->string.'\''.($this->string[strlen($this->string) - 1] != 's' ? 's' : ''));
    }
Get the possessive version of a string.

@return \Spatie\String\Str