original_string: public static function upper($string, $locale = false, $charset = null)
      {
          if ($locale) {
              if (Horde_Util::extensionExists('mbstring')) {
                  if (is_null($charset)) {
                      throw new InvalidArgumentException('$charset argument must not be null');
                  }
                  $ret = @mb_strtoupper($string, self::_mbstringCharset($charset));
                  if (!empty($ret)) {
                      return $ret;
                  }
              }
              return strtoupper($string);
          }
  
          if (!isset(self::$_uppers[$string])) {
              $language = setlocale(LC_CTYPE, 0);
              setlocale(LC_CTYPE, 'C');
              self::$_uppers[$string] = strtoupper($string);
              setlocale(LC_CTYPE, $language);
          }
  
          return self::$_uppers[$string];
      }
code: public static function upper($string, $locale = false, $charset = null)
      {
          if ($locale) {
              if (Horde_Util::extensionExists('mbstring')) {
                  if (is_null($charset)) {
                      throw new InvalidArgumentException('$charset argument must not be null');
                  }
                  $ret = @mb_strtoupper($string, self::_mbstringCharset($charset));
                  if (!empty($ret)) {
                      return $ret;
                  }
              }
              return strtoupper($string);
          }
  
          if (!isset(self::$_uppers[$string])) {
              $language = setlocale(LC_CTYPE, 0);
              setlocale(LC_CTYPE, 'C');
              self::$_uppers[$string] = strtoupper($string);
              setlocale(LC_CTYPE, $language);
          }
  
          return self::$_uppers[$string];
      }
code_tokens: public static function upper ( $ string , $ locale = false , $ charset = null ) { if ( $ locale ) { if ( Horde_Util :: extensionExists ( 'mbstring' ) ) { if ( is_null ( $ charset ) ) { throw new InvalidArgumentException ( '$charset argument must not be null' ) ; } $ ret = @ mb_strtoupper ( $ string , self :: _mbstringCharset ( $ charset ) ) ; if ( ! empty ( $ ret ) ) { return $ ret ; } } return strtoupper ( $ string ) ; } if ( ! isset ( self :: $ _uppers [ $ string ] ) ) { $ language = setlocale ( LC_CTYPE , 0 ) ; setlocale ( LC_CTYPE , 'C' ) ; self :: $ _uppers [ $ string ] = strtoupper ( $ string ) ; setlocale ( LC_CTYPE , $ language ) ; } return self :: $ _uppers [ $ string ] ; }
docstring: Makes a string uppercase.
  
  @param string $string   The string to be converted.
  @param boolean $locale  If true the string will be converted based on a
  given charset, locale independent else.
  @param string $charset  If $locale is true, the charset to use when
  converting. If not provided the current charset.
  
  @return string  The string with uppercase characters.
docstring_tokens: Makes a string uppercase .