完善资料让更多小伙伴认识你,还能领取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; } } |
|
相关推荐 |
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
2024年上海海思MCU开发者体验官招募,手机/MatePad大奖等你拿!
609 浏览 0 评论
【xG24 Matter开发套件试用体验】蓝牙控制板载LED
633 浏览 0 评论
768 浏览 0 评论
电赛:mspm0l1306的开发板可以烧录程序,但是程序运行不了,怎么解决这个问题?
952 浏览 1 评论
【xG24 Matter开发套件试用体验】Silicon Labs 基于 EFR32MG24 Explorer Kit 开发板 开箱试用体验
768 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
10500 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-4 21:16 , Processed in 0.437623 second(s), Total 39, Slave 32 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191