src/TextFormatter.php
protected function uppercaseWord($word)
    {
        // see if first characters are special
        $prefix = '';
        $hasPunctuation = true;
        do {
            $first = mb_substr($word, 0, 1, $this->encoding);
            if ($this->isPunctuation($first)) {
                $prefix .= $first;
                $word = mb_substr($word, 1, -1, $this->encoding);
            } else {
                $hasPunctuation = false;
            }
        } while ($hasPunctuation === true);

        return $prefix . ucwords($word);
    }
protected function uppercaseWord($word)
    {
        // see if first characters are special
        $prefix = '';
        $hasPunctuation = true;
        do {
            $first = mb_substr($word, 0, 1, $this->encoding);
            if ($this->isPunctuation($first)) {
                $prefix .= $first;
                $word = mb_substr($word, 1, -1, $this->encoding);
            } else {
                $hasPunctuation = false;
            }
        } while ($hasPunctuation === true);

        return $prefix . ucwords($word);
    }
protected function uppercaseWord ( $ word ) { // see if first characters are special $ prefix = '' ; $ hasPunctuation = true ; do { $ first = mb_substr ( $ word , 0 , 1 , $ this -> encoding ) ; if ( $ this -> isPunctuation ( $ first ) ) { $ prefix .= $ first ; $ word = mb_substr ( $ word , 1 , - 1 , $ this -> encoding ) ; } else { $ hasPunctuation = false ; } } while ( $ hasPunctuation === true ) ; return $ prefix . ucwords ( $ word ) ; }
Performs the uppercase action on the given word

@param $word
@return string
Performs the uppercase action on the given word