php字符串查找函数zend_memnstr

WBOY
Release: 2016-06-23 13:31:40
Original
984 people have browsed it

Zend/zend_operators.h:
Copy after login
static inline char * zend_memnstr(char *haystack, char *needle, int needle_len, char *end){     //字符首指针     char *p = haystack;     //最后一个字符     char ne = needle[needle_len-1];      //减小查询范围,判断needle_len应该小于end还算比较巧妙哦     end -= needle_len;     while (p   <p>php函数strpos、explode都用到了此函数,具体代码可以查看:ext/standard/string.c</p>  <p class="sycode">   </p><p>版权声明:本文为博主原创文章,未经博主允许不得转载。</p>   
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template