In my program I am checking wether a emailid exists in a listI have in the complete_list a string like"<aa@abc.com> <ab@abc.com> <bc@abc.com> ... <xy@abc.com>" that is astring of emailids sortedNow I want to find out if another ID "<lm@abc.com>" exists in this listHow is it possible to optimize the search given that the complete liststring is sorted in orderThanksRam 解决方案bsearch/david--"As a scientist, Throckmorton knew that if he were ever to break wind inthe echo chamber, he would never hear the end of it." bsearchDoesn''t seem to work very well when you have to search inside a string,does it?Dan--Dan PopDESY Zeuthen, RZ groupEmail: Da*****@ifh.debsearch Doesn''t seem to work very well when you have to search inside a string, does it?in theory if they''re all the same size it could work. Though yeah you''reright for general strings bsearch isn''t too helpful.Tom 这篇关于有没有替代strstr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!