//// Created by xzl on 2019/6/28.//#include "Parser.h"namespacemediakit{stringFindField(constchar*buf,constchar*start,constchar*end,intbufSize){if(bufSize<=0){bufSize=strlen(buf);}constchar*msg_start=buf,*msg_end=buf+bufSize;intlen=0;if(start!=NULL){len=strlen(start);msg_start=strstr(buf,start);}if(msg_start==NULL){return"";}msg_start+=len;if(end!=NULL){msg_end=strstr(msg_start,end);if(msg_end==NULL){return"";}}returnstring(msg_start,msg_end);}}//namespacemediakit