1.实现在一块内存中查找子串位置:该函数主要是为了在二进制文本中进行查找操作。
1 23 //获取字符流中的指定子串的位置 2 24 char* memstr(char* full_data, int full_data_len, char* substr) 3 25 { 4 26 if (full_data == NULL || full_data_len <= 0 || substr == NULL) { 5 27 return NULL; 6 28 } 7 29 8 30 if (*substr == '