本文整理汇总了PHP中utf8_stristr函数的典型用法代码示例。如果您正苦于以下问题:PHP utf8_stristr函数的具体用法?PHP utf8_stristr怎么用?PHP utf8_stristr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了utf8_stristr函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: stristr
/**
* UTF-8 aware alternative to stristr()
*
* Returns all of haystack from the first occurrence of needle to the end. Needle and haystack are examined in a case-insensitive manner to
* find the first occurrence of a string using case insensitive comparison.
*
* @param string $str The haystack
* @param string $search The needle
*
* @return string the sub string
*
* @see http://www.php.net/stristr
* @since 1.3.0
*/
public static function stristr($str, $search)
{
return utf8_stristr($str, $search);
}
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:18,代码来源:StringHelper.php
示例2: stristr
/**
* UTF-8 aware alternative to stristr
* Returns all of haystack from the first occurrence of needle to the end.
* needle and haystack are examined in a case-insensitive manner
* Find first occurrence of a string using case insensitive comparison
*
* @param string $str The haystack
* @param string $search The needle
*
* @return string the sub string
*
* @see http://www.php.net/stristr
* @since 11.1
*/
public static function stristr($str, $search)
{
jimport('phputf8.stristr');
return utf8_stristr($str, $search);
}
开发者ID:nogsus,项目名称:joomla-platform,代码行数:19,代码来源:string.php
示例3: testLinefeedBoth
function testLinefeedBoth()
{
$str = "iñtërn\nâtiônàlizætiøn";
$search = "N\nÂT";
$this->assertEqual(utf8_stristr($str, $search), "n\nâtiônàlizætiøn");
}
开发者ID:kidwellj,项目名称:scuttle,代码行数:6,代码来源:utf8_stristr.test.php
示例4: stristr
/**
* UTF-8 aware alternative to stristr
* Returns all of haystack from the first occurrence of needle to the end.
* needle and haystack are examined in a case-insensitive manner
* Find first occurrence of a string using case insensitive comparison
*
* @param string $str The haystack
* @param string $search The needle
*
* @return string the sub string
*
* @see http://www.php.net/stristr
* @since 2.0
*/
public static function stristr($str, $search)
{
if (!function_exists('utf8_stristr')) {
require_once __DIR__ . '/phputf8/stristr.php';
}
return utf8_stristr($str, $search);
}
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:21,代码来源:Utf8String.php
示例5: stristr
/**
* UTF-8 aware alternative to stristr
* Returns all of haystack from the first occurrence of needle to the end.
* needle and haystack are examined in a case-insensitive manner
* Find first occurrence of a string using case insensitive comparison
*
* @param string $str The haystack
* @param string $search The needle
*
* @return string the sub string
*
* @see http://www.php.net/stristr
* @since 1.0
*/
public static function stristr($str, $search)
{
require_once __DIR__ . '/phputf8/stristr.php';
return utf8_stristr($str, $search);
}
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:19,代码来源:String.php
注:本文中的utf8_stristr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论