當前位置: 首頁>>代碼示例>>PHP>>正文


PHP _ucwords函數代碼示例

本文整理匯總了PHP中_ucwords函數的典型用法代碼示例。如果您正苦於以下問題:PHP _ucwords函數的具體用法?PHP _ucwords怎麽用?PHP _ucwords使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了_ucwords函數的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _show_header

 function _show_header()
 {
     $pheader = t("Shop");
     $subheader = _ucwords(str_replace("_", " ", $_GET["action"]));
     $cases = ["show" => "Products", "add" => "Add product"];
     if (isset($cases[$_GET["action"]])) {
         $subheader = $cases[$_GET["action"]];
     }
     return ["header" => $pheader, "subheader" => $subheader ? _prepare_html($subheader) : ""];
 }
開發者ID:yfix,項目名稱:yf,代碼行數:10,代碼來源:yf_manage_shop__show_header.class.php

示例2: test_cases

 public function test_cases()
 {
     $sentence = 'пользователь должен быть у Вас в друзьях а Вы у него';
     $this->assertEquals('ПОЛЬЗОВАТЕЛЬ ДОЛЖЕН БЫТЬ У ВАС В ДРУЗЬЯХ А ВЫ У НЕГО', trim(_strtoupper($sentence)));
     $this->assertEquals('пользователь должен быть у вас в друзьях а вы у него', trim(_strtolower($sentence)));
     $this->assertNotEquals(strtoupper($sentence), _strtoupper($sentence));
     $this->assertNotEquals(strtolower($sentence), _strtolower($sentence));
     $this->assertNotEquals(ucfirst($sentence), _ucfirst($sentence));
     $this->assertNotEquals(ucwords($sentence), _ucwords($sentence));
 }
開發者ID:yfix,項目名稱:yf,代碼行數:10,代碼來源:class_utf8.Test.php

示例3: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase.
  * @see http://php.net/ucwords
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string   mixed case string
  * @return  string
  */
 public static function ucwords($str)
 {
     if (!isset(self::$called[__FUNCTION__])) {
         require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
         // Function has been called
         self::$called[__FUNCTION__] = TRUE;
     }
     return _ucwords($str);
 }
開發者ID:momoim,項目名稱:momo-api,代碼行數:18,代碼來源:utf8.php

示例4: _show_header

 /**
  */
 function _show_header()
 {
     $pheader = t('Static pages');
     $subheader = _ucwords(str_replace('_', ' ', $_GET['action']));
     $cases = ['show' => '', 'edit' => ''];
     if (isset($cases[$_GET['action']])) {
         $subheader = $cases[$_GET['action']];
     }
     return ['header' => $pheader, 'subheader' => $subheader ? _prepare_html($subheader) : ''];
 }
開發者ID:yfix,項目名稱:yf,代碼行數:12,代碼來源:yf_static_pages.class.php

示例5: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase.
  * This is a UTF8-aware version of [ucwords](http://php.net/ucwords).
  *
  *     $str = UTF8::ucwords($str);
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  * @param   string   mixed case string
  * @return  string
  * @uses    UTF8::$server_utf8
  */
 public static function ucwords($str)
 {
     if (!isset(self::$called[__FUNCTION__])) {
         require SYSPATH . 'utf8' . DIRECTORY_SEPARATOR . __FUNCTION__ . EXT;
         // Function has been called
         self::$called[__FUNCTION__] = TRUE;
     }
     return _ucwords($str);
 }
開發者ID:gilyaev,項目名稱:framework-bench,代碼行數:20,代碼來源:utf8.php

示例6: ucwords

 public static function ucwords($str)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require JsonApiApplication::find_file("utf8", __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = TRUE;
     }
     return _ucwords($str);
 }
開發者ID:benshez,項目名稱:DreamWeddingCeremonies,代碼行數:9,代碼來源:UTF8.php

示例7: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase.
  * @see http://php.net/ucwords
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string   mixed case string
  * @return  string
  */
 public static function ucwords($str)
 {
     require_once dirname(__FILE__) . '/' . __FUNCTION__ . '.php';
     return _ucwords($str);
 }
開發者ID:abhinay100,項目名稱:forma_app,代碼行數:14,代碼來源:lib.utf8.php

示例8: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase.
  * This is a UTF8-aware version of [ucwords](http://php.net/ucwords).
  *
  *     $str = UTF8::ucwords($str);
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  * @param   string  $str mixed case string
  * @return  string
  */
 public static function ucwords($str)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require Kohana::find_file('utf8', __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = TRUE;
     }
     return _ucwords($str);
 }
開發者ID:Chinese1904,項目名稱:openclassifieds2,代碼行數:19,代碼來源:UTF8.php

示例9: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase
  *
  * This is a UTF8-aware version of [ucwords](http://php.net/ucwords).
  *
  * Example:
  * ~~~
  * $str = UTF8::ucwords($str);
  * ~~~
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string  $str  Mixed case string
  *
  * @return  string
  *
  * @uses    UTF8::$server_utf8
  * @uses    Kohana::find_file
  */
 public static function ucwords($str)
 {
     UTF8::_load(__FUNCTION__);
     return _ucwords($str);
 }
開發者ID:ultimateprogramer,項目名稱:cms,代碼行數:24,代碼來源:utf8.php

示例10: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase.
  *
  * @see     http://php.net/ucwords
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string   mixed case string
  * @return  string
  */
 public static function ucwords($str)
 {
     if (UTF8::$server_utf8) {
         return mb_convert_case($str, MB_CASE_TITLE, Kohana::$charset);
     }
     if (!isset(self::$called[__FUNCTION__])) {
         require SYSPATH . 'utf8/' . __FUNCTION__ . EXT;
         // Function has been called
         self::$called[__FUNCTION__] = TRUE;
     }
     return _ucwords($str);
 }
開發者ID:jimktrains,項目名稱:rccms,代碼行數:21,代碼來源:utf8.php

示例11: ucwords

 /**
  * Makes the first character of every word in a UTF-8 string uppercase.
  * This is a UTF8-aware version of [ucwords](http://php.net/ucwords).
  *
  *     $str = UTF8::ucwords($str);
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  * @param   string  $str mixed case string
  * @return  string
  */
 public static function ucwords($str)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require Phalcana::$di->get('fs')->findFile('utf8', __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = true;
     }
     return _ucwords($str);
 }
開發者ID:braf,項目名稱:phalcana-core,代碼行數:19,代碼來源:UTF8.php

示例12: _show_header

 /**
  * Display header content (hook)
  */
 function _show_header()
 {
     if (conf('no_page_header')) {
         return false;
     }
     $page_header = '';
     $page_subheader = '';
     // Display hook contents
     // TODO: need to check permissions at first
     #		$obj = module($_GET['object']);
     if (method_exists($obj, '_show_header')) {
         $result = $obj->_show_header();
         if (is_array($result)) {
             $page_header = $result['header'];
             $page_subheader = $result['subheader'];
         } else {
             return strval($result);
         }
     }
     // Show default header
     if (!isset($page_header)) {
         $page_header = _ucwords(str_replace('_', ' ', $_GET['object']));
     }
     if (!isset($page_subheader)) {
         if ($_GET['action'] != 'show') {
             $page_subheader = _ucwords(str_replace('_', ' ', $_GET['action']));
         }
     }
     $replace = ['header' => $page_header ? t($page_header) : '', 'subheader' => $page_subheader ? t($page_subheader) : ''];
     return tpl()->parse('system/page_header', $replace);
 }
開發者ID:yfix,項目名稱:yf,代碼行數:34,代碼來源:yf_graphics.class.php


注:本文中的_ucwords函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。