当前位置: 首页>>代码示例>>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;未经允许,请勿转载。