upperCaseWords

@return  static
511743
public function upperCaseWords()
    {
        return $this->cloneInstance(
            function (StringObject $new) {
                $new->string = Mbstring::ucwords($new->string, $this->encoding);
            }
        );
    }
802328
public static function toPascalCase(string $string): string
    {
        $words = self::_prepStringForCasing($string);
        $string = implode('', array_map([
            static::class,
            'upperCaseFirst'
        ], $words));

        return $string;
    }
595862
public static function fix_case($word) {
    # Fix case for words split by periods (J.P.)
    if (strpos($word, '.') !== false) {
      $word = self::safe_ucfirst(".", $word);;
    }
    # Fix case for words split by hyphens (Kimura-Fay)
    if (strpos($word, '-') !== false) {
      $word = self::safe_ucfirst("-", $word);
    }
    # Special case for single letters
    if (strlen($word) == 1) {
      $word = strtoupper($word);
    }
    # Special case for 2-letter words
    if (strlen($word) == 2) {
      # Both letters vowels (uppercase both)
      if (in_array(strtolower($word{0}), self::$dict['vowels']) && in_array(strtolower($word{1}), self::$dict['vowels'])) {
        $word = strtoupper($word);
      }
      # Both letters consonants (uppercase both)
      if (!in_array(strtolower($word{0}), self::$dict['vowels']) && !in_array(strtolower($word{1}), self::$dict['vowels'])) {
        $word = strtoupper($word);
      }
      # First letter is vowel, second letter consonant (uppercase first)
      if (in_array(strtolower($word{0}), self::$dict['vowels']) && !in_array(strtolower($word{1}), self::$dict['vowels'])) {
        $word = ucfirst(strtolower($word));
      }
      # First letter consonant, second letter vowel or "y" (uppercase first)
      if (!in_array(strtolower($word{0}), self::$dict['vowels']) && (in_array(strtolower($word{1}), self::$dict['vowels']) || strtolower($word{1}) == 'y')) {
        $word = ucfirst(strtolower($word));
      }
    }
    # Fix case for words which aren't initials, but are all upercase or lowercase
    if ( (strlen($word) >= 3) && (ctype_upper($word) || ctype_lower($word)) ) {
      $word = ucfirst(strtolower($word));
    }
    return $word;
  }
114970
private static Term getUpperTerm(String upperName) {
        String text;
        if (upperName == null) {
            text = "\uFFFF";
        } else {
            text = upperName;
        }
        return new Term(FieldNames.LOCAL_NAME, text);
    }
806223
def _upcase_word(text, pos):
    """"""
    text, new_pos = _forward_word(text, pos)
    return text[:pos] + text[pos:new_pos].upper() + text[new_pos:], new_pos
877545
public function charFirstUpper()
    {
        $str = $this->val();
        $upper = mb_convert_case($str, MB_CASE_UPPER, self::DEF_ENCODING);
        $firstChar = mb_substr($upper, 0, 1, self::DEF_ENCODING);
        $str = $firstChar . mb_substr($str, 1, null, self::DEF_ENCODING);
        $this->val($str);

        return $this;
    }
698272
public function toCamelCase(): self
    {

        return $this->split('/[_\s\W]+/')
            ->reduce(function (Text $carry, Text $piece) {
                return $carry->append($piece->toUpperFirst()->stringify());
            }, self::make())
            ->toLowerFirst();
    }
220441
public function convertTitle()
    {
        if ($this->title === null) {
            return '';
        }

        foreach ($this->splitWords() as $index => $word) {
            if ($this->wordShouldBeUppercase($index, $word)) {
                $this->rebuildTitle($index, $this->uppercaseWord($word));
            }
        }

        return $this->title;
    }
569334
public function getMessageType() {
    // 
    $messageType = static::types()[$this->type];
    // If not incoming
    if ($this->type != static::INCOMING) {
      // Change to uppercase
      $messageType = strtoupper($messageType);
    }
    // Return
    return $messageType;
  }
1041453
protected function uppercaseAndSafeTransliterate($string)
    {
        // Кириллические символы, для которых описан массив "мягких" замен $latin_chars.
        static $cyr_chars = [
            'А', 'В', 'Б', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'Р', 'С', 'Т', 'У', 'Ф',
            'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ы', 'Э', 'Ю', 'Я',
        ];

        // Латинские аналоги кириллических символов, что описаны в массиве $cyr_chars.
        static $latin_chars = [
            'A', 'B', 'B', 'G', 'D', 'E', 'E', 'J', 'Z', 'I', 'I', 'K', 'L', 'M', 'H', 'O', 'P', 'C', 'T', 'Y', 'F',
            'X', 'C', 'H', 'W', 'W', 'Y', 'E', 'U', 'Y',
        ];

        // Производим замену латинских символов, которые при дальнейшей транслитерации дают 2 символа на выходе,
        // вместо одного (например 'я' -> 'ya'), и переводим в верхний регистр
        $string = \str_replace($cyr_chars, $latin_chars, Str::upper((string) $string));

        // Производим конечную транслитерацию
        return Str::ascii($string);
    }
1080211
public static function titleize($word, $uppercase = '')
    {
        $uppercase = $uppercase == 'first' ? 'ucfirst' : 'ucwords';
        return $uppercase(self::humanize(self::underscore($word)));
    }
308591
public static function upperCaseFirst($str, $encoding = null)
    {
        return (string) Stringy::create($str, $encoding)->upperCaseFirst();
    }
22488
public function getStopWords(): StopWords {
        if (is_null($this->stopWords)) {
            $this->stopWords = new StopWords($this);
        }

        return $this->stopWords;
    }
374693
public function pascal() {
    if (!$this->areTitleCase) {
      $this->pieces = array_map('ucfirst', $this->pieces);
    }
    return implode('', $this->pieces);
  }
179384
public function toCamelCase() : Manipulator
    {
        $modifiedString = '';

        foreach (explode(' ', $this->string) as $word) {
            $modifiedString .= self::make($word)->toLower()->capitalize()->toString();
        }

        $final = self::make($modifiedString)
            ->replace(' ', '')
            ->lowercaseFirst()
            ->toString();

        return new static($final);
    }
404266
public function lowerCaseFirst()
    {
        return $this->cloneInstance(
            function (StringObject $new) {
                $new->string = Mbstring::lcfirst($new->string, $this->encoding);
            }
        );
    }
39166
public function swapCase()
    {
        return $this->newSelf(preg_replace_callback
        (
            '/[\S]/u',
            function ($match)
            {
                $marchToUpper = UTF8::strtoupper($match[0], $this->encoding);

                if ($match[0] == $marchToUpper)
                {
                    return UTF8::strtolower($match[0], $this->encoding);
                }
                else
                {
                    return $marchToUpper;
                }
            },
            $this->scalarString
        ));
    }