src/includes/classes/Core/Utils/Name.php
protected function stripClean(string $name)
    {
        static $last_in, $last_out;

        if ($name === $last_in && isset($last_out)) {
            return $last_out;
        } else {
            $last_in = $name;
        }
        if (!isset($name[0])) {
            return $last_out = $name;
        }
        $name = str_replace('"', '', $name);
        $name = preg_replace('/^(?:Mr\.?|Mrs\.?|Ms\.?|Dr\.?)\s+/ui', '', $name);
        $name = preg_replace('/\s+(?:Sr\.?|Jr\.?|IV|I+)$/ui', '', $name);
        $name = preg_replace('/\s+/u', ' ', $name);
        $name = $this->c::mbTrim($name);

        return $last_out = $name;
    }
protected function stripClean(string $name)
    {
        static $last_in, $last_out;

        if ($name === $last_in && isset($last_out)) {
            return $last_out;
        } else {
            $last_in = $name;
        }
        if (!isset($name[0])) {
            return $last_out = $name;
        }
        $name = str_replace('"', '', $name);
        $name = preg_replace('/^(?:Mr\.?|Mrs\.?|Ms\.?|Dr\.?)\s+/ui', '', $name);
        $name = preg_replace('/\s+(?:Sr\.?|Jr\.?|IV|I+)$/ui', '', $name);
        $name = preg_replace('/\s+/u', ' ', $name);
        $name = $this->c::mbTrim($name);

        return $last_out = $name;
    }
Strip prefixes/suffixes.

@since 151121 Adding name utilities.

@param string $name Full name.

@return string Name w/o prefixes/suffixes.