本文整理汇总了PHP中_stristr函数的典型用法代码示例。如果您正苦于以下问题:PHP _stristr函数的具体用法?PHP _stristr怎么用?PHP _stristr使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_stristr函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stristr
/**
* Case-insenstive UTF-8 version of strstr. Returns all of input string
* from the first occurrence of needle to the end. This is a UTF8-aware
* version of [stristr](http://php.net/stristr).
*
* $found = UTF8::stristr($str, $search);
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @param string input string
* @param string needle
* @return string matched substring if found
* @return FALSE if the substring was not found
*/
public static function stristr($str, $search)
{
if (!isset(self::$called[__FUNCTION__])) {
require SYSPATH . 'utf8' . DIRECTORY_SEPARATOR . __FUNCTION__ . EXT;
// Function has been called
self::$called[__FUNCTION__] = TRUE;
}
return _stristr($str, $search);
}
示例2: stristr
/**
* Case-insenstive UTF-8 version of strstr. Returns all of input string
* from the first occurrence of needle to the end.
* @see http://php.net/stristr
*
* @author Harry Fuecks <hfuecks@gmail.com>
*
* @param string input string
* @param string needle
* @return string matched substring if found
* @return boolean FALSE if the substring was not found
*/
public static function stristr($str, $search)
{
if (!isset(self::$called[__FUNCTION__])) {
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
// Function has been called
self::$called[__FUNCTION__] = TRUE;
}
return _stristr($str, $search);
}
示例3: stristr
public static function stristr($str, $search)
{
if (!isset(UTF8::$called[__FUNCTION__])) {
require JsonApiApplication::find_file("utf8", __FUNCTION__);
// Function has been called
UTF8::$called[__FUNCTION__] = TRUE;
}
return _stristr($str, $search);
}
示例4: stristr
/**
* Case-insenstive UTF-8 version of strstr. Returns all of input string
* from the first occurrence of needle to the end.
* @see http://php.net/stristr
*
* @author Harry Fuecks <hfuecks@gmail.com>
*
* @param string input string
* @param string needle
* @return string matched substring if found
* @return boolean FALSE if the substring was not found
*/
public static function stristr($str, $search)
{
require_once dirname(__FILE__) . '/' . __FUNCTION__ . '.php';
return _stristr($str, $search);
}
示例5: stristr
/**
* Case-insensitive UTF-8 version of strstr. Returns all of input string
* from the first occurrence of needle to the end. This is a UTF8-aware
* version of [stristr](http://php.net/stristr).
*
* $found = UTF8::stristr($str, $search);
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @param string $str input string
* @param string $search needle
* @return string matched substring if found
* @return FALSE if the substring was not found
*/
public static function stristr($str, $search)
{
if (!isset(UTF8::$called[__FUNCTION__])) {
require Kohana::find_file('utf8', __FUNCTION__);
// Function has been called
UTF8::$called[__FUNCTION__] = TRUE;
}
return _stristr($str, $search);
}
示例6: stristr
/**
* Case-insensitive UTF-8 version of strstr
*
* Returns all of input string from the first occurrence of needle to the end.
* This is a UTF8-aware version of [stristr](http://php.net/stristr).
*
* Example:
* ~~~
* $found = UTF8::stristr($str, $search);
* ~~~
*
* @author Harry Fuecks <hfuecks@gmail.com>
*
* @param string $str Input string
* @param string $search Needle
*
* @return mixed
*
* @uses Kohana::find_file
*/
public static function stristr($str, $search)
{
UTF8::_load(__FUNCTION__);
return _stristr($str, $search);
}
示例7: stristr
/**
* Case-insensitive UTF-8 version of strstr. Returns all of input string
* from the first occurrence of needle to the end. This is a UTF8-aware
* version of [stristr](http://php.net/stristr).
*
* $found = UTF8::stristr($str, $search);
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @param string $str input string
* @param string $search needle
* @return string matched substring if found
* @return false if the substring was not found
*/
public static function stristr($str, $search)
{
if (!isset(UTF8::$called[__FUNCTION__])) {
require Phalcana::$di->get('fs')->findFile('utf8', __FUNCTION__);
// Function has been called
UTF8::$called[__FUNCTION__] = true;
}
return _stristr($str, $search);
}