当前位置: 首页>>代码示例>>PHP>>正文


PHP Utf8::ucfirst方法代码示例

本文整理汇总了PHP中Patchwork\Utf8::ucfirst方法的典型用法代码示例。如果您正苦于以下问题:PHP Utf8::ucfirst方法的具体用法?PHP Utf8::ucfirst怎么用?PHP Utf8::ucfirst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Patchwork\Utf8的用法示例。


在下文中一共展示了Utf8::ucfirst方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTitle

 public function getTitle()
 {
     $title = Utf8::ucfirst($this->title['parent']);
     if ($this->title['child']) {
         $title .= ' – ' . Utf8::ucfirst($this->title['child']);
     }
     $title .= ' – ' . $this->appname;
     return $title;
 }
开发者ID:hilmysyarif,项目名称:phpv8,代码行数:9,代码来源:BaseBackController.php

示例2: __construct

 public function __construct($repository = null)
 {
     $this->repository = $repository;
     $this->applicationName = Config::get('typicms.' . App::getLocale() . '.websiteTitle');
     $instance = $this;
     View::composer($this->layout, function (\Illuminate\View\View $view) use($instance) {
         $view->withTitle(Utf8::ucfirst(implode(' ', $instance->title)) . ' – ' . $instance->applicationName);
     });
     $bodyClass = ['lang-' . App::getLocale(), $repository->getModel()->getTable()];
     if (Sentry::getUser() && !Input::get('preview')) {
         $bodyClass[] = 'has-navbar';
     }
     View::share('lang', App::getLocale());
     View::share('bodyClass', implode(' ', $bodyClass));
 }
开发者ID:Ayoubblog,项目名称:TypiCMS,代码行数:15,代码来源:BasePublicController.php

示例3: api_ucfirst

/**
 * Makes a string's first character uppercase.
 * @param string $string				The input string.
 * @param string $encoding (optional)	The used internally by this function character encoding.
 * If it is omitted, the platform character set will be used by default.
 * @return string						Returns a string with the first character capitalized, if that character is alphabetic.
 * This function is aimed at replacing the function ucfirst() for human-language strings.
 * @link http://php.net/manual/en/function.ucfirst
 */
function api_ucfirst($string, $encoding = null)
{
    return Utf8::ucfirst($string);
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:13,代码来源:internationalization.lib.php

示例4: upperFirst

 public function upperFirst()
 {
     $this->string = u::ucfirst($this->string);
     return $this;
 }
开发者ID:robclancy,项目名称:string,代码行数:5,代码来源:String.php

示例5: utf8_ucfirst

/**
 * Make sure the first letter is uppercase
 *
 * @param string $str
 *
 * @return string
 *
 * @deprecated Deprecated since Contao 4.0, to be removed in Contao 5.0.
 *             Use Patchwork\Utf8::ucfirst() instead.
 */
function utf8_ucfirst($str)
{
    @trigger_error('Using utf8_ucfirst() has been deprecated and will no longer work in Contao 5.0. Use Patchwork\\Utf8::ucfirst() instead.', E_USER_DEPRECATED);
    return Utf8::ucfirst($str);
}
开发者ID:contao,项目名称:core-bundle,代码行数:15,代码来源:functions.php

示例6: postForgotPassword

 /**
  * Request forgot password
  * @param $email string
  * @return redirect
  */
 public function postForgotPassword()
 {
     $valid = Validator::make(Input::all(), array('email' => 'required|email|exists:users'), array('exists' => \Patchwork\Utf8::ucfirst(trans('larauth::larauth.account_with_email_not_exist'))));
     if (!$valid->passes()) {
         return Redirect::route('larauth.forgot_password')->with('errors', $valid->errors())->with(Input::all());
     }
     $user = Sentry::findUserByCredentials(['email' => Input::get('email')]);
     $key = $user->getResetPasswordCode();
     $data = ['key' => $key, 'email' => Input::get('email'), 'subject' => trans('larauth::larauth.password_recovery')];
     $this->sendMail(Config::get('larauth::views.mail_forgotpassword'), $data);
     return Redirect::route('larauth.forgot_password')->with('processed', true);
 }
开发者ID:bitw,项目名称:larauth,代码行数:17,代码来源:LarauthController.php

示例7: added

 public function added()
 {
     setlocale(LC_TIME, 'fr_FR.utf8', 'fra');
     $dt = Carbon::parse($this->created_at);
     return Utf8::ucfirst($dt->formatLocalized('%A %d %B %Y'));
 }
开发者ID:khaledof,项目名称:brikaCms,代码行数:6,代码来源:ModulePresenter.php

示例8: test_linefeed

 public function test_linefeed()
 {
     $str = "ñtërn\nâtiônàlizætiøn";
     $ucfirst = "Ñtërn\nâtiônàlizætiøn";
     $this->assertEquals($ucfirst, u::ucfirst($str));
 }
开发者ID:nicolas-grekas,项目名称:Patchwork-sandbox,代码行数:6,代码来源:Utf8UcfirstTest.php


注:本文中的Patchwork\Utf8::ucfirst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。