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


PHP _substr_replace函数代码示例

本文整理汇总了PHP中_substr_replace函数的典型用法代码示例。如果您正苦于以下问题:PHP _substr_replace函数的具体用法?PHP _substr_replace怎么用?PHP _substr_replace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: substr_replace

 /**
  * Replaces text within a portion of a UTF-8 string.
  * @see http://php.net/substr_replace
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string   input string
  * @param   string   replacement string
  * @param   integer  offset
  * @return  string
  */
 public static function substr_replace($str, $replacement, $offset, $length = NULL)
 {
     if (!isset(self::$called[__FUNCTION__])) {
         require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
         // Function has been called
         self::$called[__FUNCTION__] = TRUE;
     }
     return _substr_replace($str, $replacement, $offset, $length);
 }
开发者ID:momoim,项目名称:momo-api,代码行数:20,代码来源:utf8.php

示例2: substr_replace

 public static function substr_replace($str, $replacement, $offset, $length = NULL)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require JsonApiApplication::find_file("utf8", __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = TRUE;
     }
     return _substr_replace($str, $replacement, $offset, $length);
 }
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:9,代码来源:UTF8.php

示例3: substr_replace

 /**
  * Replaces t'.php' within a portion of a UTF-8 string.
  * @see http://php.net/substr_replace
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string   input string
  * @param   string   replacement string
  * @param   integer  offset
  * @return  string
  */
 public static function substr_replace($str, $replacement, $offset, $length = NULL)
 {
     require_once dirname(__FILE__) . '/' . __FUNCTION__ . '.php';
     return _substr_replace($str, $replacement, $offset, $length);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:16,代码来源:lib.utf8.php

示例4: substr_replace

 /**
  * Replaces text within a portion of a UTF-8 string
  *
  * This is a UTF8-aware version of [substr_replace](http://php.net/substr_replace).
  *
  * If `$length` given and is positive, it represents the length of the portion of `$str`
  * which is to be replaced. If it is negative, it represents the number of characters
  * from the end of `$str` at which to stop replacing. If it is not given, then it will default
  * to strlen(`$str`); i.e. end the replacing at the end of `$str`. Of course, if `$length` is zero
  * then this function will have the effect of inserting `$replacement` into `$str` at the given start `$offset`.
  *
  * Example:
  * ~~~
  * $str = UTF8::substr_replace($str, $replacement, $offset);
  * ~~~
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string   $str          Input string
  * @param   string   $replacement  Replacement string
  * @param   integer  $offset       Offset
  * @param   mixed    $length       The length of the portion of $string which is to be replaced [Optional]
  *
  * @return  string
  *
  * @uses    Kohana::find_file
  */
 public static function substr_replace($str, $replacement, $offset, $length = NULL)
 {
     UTF8::_load(__FUNCTION__);
     return _substr_replace($str, $replacement, $offset, $length);
 }
开发者ID:ultimateprogramer,项目名称:cms,代码行数:32,代码来源:utf8.php

示例5: substr_replace

 /**
  * Replaces text within a portion of a UTF-8 string. This is a UTF8-aware
  * version of [substr_replace](http://php.net/substr_replace).
  *
  *     $str = UTF8::substr_replace($str, $replacement, $offset);
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  *
  * @param   string  $str         input string
  * @param   string  $replacement replacement string
  * @param   integer $offset      offset
  *
  * @return  string
  */
 public static function substr_replace($str, $replacement, $offset, $length = null)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require Kohana::find_file('utf8', __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = true;
     }
     return _substr_replace($str, $replacement, $offset, $length);
 }
开发者ID:s4urp8n,项目名称:kohana-admin,代码行数:23,代码来源:UTF8.php

示例6: substr_replace

 /**
  * Replaces text within a portion of a UTF-8 string. This is a UTF8-aware
  * version of [substr_replace](http://php.net/substr_replace).
  *
  *     $str = UTF8::substr_replace($str, $replacement, $offset);
  *
  * @author  Harry Fuecks <hfuecks@gmail.com>
  * @param   string  $str            input string
  * @param   string  $replacement    replacement string
  * @param   integer $offset         offset
  * @return  string
  */
 public static function substr_replace($str, $replacement, $offset, $length = NULL)
 {
     if (!isset(self::$called[__FUNCTION__])) {
         require Kohana::find_file('utf8', __FUNCTION__);
         // Function has been called
         self::$called[__FUNCTION__] = TRUE;
     }
     return _substr_replace($str, $replacement, $offset, $length);
 }
开发者ID:BenjaminRomeo,项目名称:KohanaTest,代码行数:21,代码来源:UTF8.php


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