예제 #1
0
 /**
  * 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 <*****@*****.**>
  * @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
0
파일: utf8.php 프로젝트: momoim/momo-api
 /**
  * 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 <*****@*****.**>
  *
  * @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
0
 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
0
 /**
  * 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 <*****@*****.**>
  *
  * @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
0
 /**
  * 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 <*****@*****.**>
  * @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
0
 /**
  * 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 <*****@*****.**>
  *
  * @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
0
파일: UTF8.php 프로젝트: braf/phalcana-core
 /**
  * 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 <*****@*****.**>
  * @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);
 }