本文整理匯總了PHP中Nette\String::upper方法的典型用法代碼示例。如果您正苦於以下問題:PHP String::upper方法的具體用法?PHP String::upper怎麽用?PHP String::upper使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Nette\String
的用法示例。
在下文中一共展示了String::upper方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: convert
/**
* @param string $charset
* @return \Curl\CurlResponse
*/
public function convert($to = "UTF-8", $from = NULL)
{
if ($from === NULL) {
$charset = $this->query['head > meta[http-equiv=Content-Type]']->attr('content');
$charset = $charset ?: $this->query['head > meta[http-equiv=content-type]']->attr('content');
$charset = $charset ?: $this->headers['Content-Type'];
$from = static::getCharset($charset);
}
$from = String::upper($from);
$to = String::upper($to);
if ($from != $to && $from && $to) {
if ($body = @iconv($from, $to, $this->body)) {
$this->Body = ltrim($body);
} else {
throw new CurlException("Charset conversion from {$from} to {$to} failed");
}
}
$this->Body = self::fixContentTypeMeta($this->body);
return $this;
}