original_string: private static function capitalize($string)
      {
          $string = mb_strtolower($string);
  
          $string = mb_ereg_replace_callback('\b\w', function ($matches) {
              return mb_strtoupper($matches[0]);
          }, $string);
  
          // Lowercase 's
          $string = mb_ereg_replace_callback('\'\w\b', function ($matches) {
              return mb_strtolower($matches[0]);
          }, $string);
  
          return $string;
      }
code: private static function capitalize($string)
      {
          $string = mb_strtolower($string);
  
          $string = mb_ereg_replace_callback('\b\w', function ($matches) {
              return mb_strtoupper($matches[0]);
          }, $string);
  
          // Lowercase 's
          $string = mb_ereg_replace_callback('\'\w\b', function ($matches) {
              return mb_strtolower($matches[0]);
          }, $string);
  
          return $string;
      }
code_tokens: private static function capitalize ( $ string ) { $ string = mb_strtolower ( $ string ) ; $ string = mb_ereg_replace_callback ( '\b\w' , function ( $ matches ) { return mb_strtoupper ( $ matches [ 0 ] ) ; } , $ string ) ; // Lowercase 's $ string = mb_ereg_replace_callback ( '\'\w\b' , function ( $ matches ) { return mb_strtolower ( $ matches [ 0 ] ) ; } , $ string ) ; return $ string ; }
docstring: Capitalize first letters.
  
  @param string $string
  
  @return string
docstring_tokens: Capitalize first letters .