完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
unsigned char *str_str(unsigned char *src,unsigned char len,unsigned char *sub)
{ bit a=0,b=0; //匹配到子串时为真 unsigned char *temp_sub,*temp_src,*org_src; org_src=src; temp_src=src;//12345678ok temp_sub=sub;//2 ok while ((temp_src-len b=0; while (*temp_src==*temp_sub) { b=1; temp_src++;temp_sub++; if (*temp_sub==0) { a=1; org_src++; break; } } if (!a) { if (!b) { org_src=temp_src; temp_src++; } else { org_src=temp_src-1; } temp_sub=sub; } } if (a) { return org_src; } else { return NULL; } } |
|
相关推荐 |
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
265 浏览 0 评论
【原创】【RA4M2-SENSOR开发板评测】低功耗+USB综合测试
789 浏览 0 评论
1306 浏览 2 评论
787 浏览 0 评论
【RA4M2-SENSOR开发板评测】Analogue+Timers综合测试
1587 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
16902 浏览 31 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 11:50 , Processed in 0.621892 second(s), Total 73, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2726