/* 题目62: 有一下特征字符串"eerrrrqqAB33333ABa333333ABjsfdsfdsa" 编写一个业务函数, 实现功能1:实现按照子串"AB"分割字符串,把“eerrrrqq”,"33333","a333333","jsfdsfdsa" 把实现结果按照二维数组(第2种内存模型)打包传出。 实现功能2:对二维数组(第二种内存模型),进行排序输出 要求1:请自己编写业务一个接口(函数),并实现功能;70分 要求2:编写测试用例。30分 要求3:自己编写内存释放函数 */ #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> /* 分析: 使用strstr函数可以很快找出AB的地址,把AB替换成 这个前面一段就会成为一个新的字符串 */ //分割字符串 int SpitAndSortStr(char *pin/*in*/, char(*pout)[100]/*out*/,int *rnum){ int ERRO_MSG = 0; if (pin == NULL || pout == NULL || rnum==NULL) { ERRO_MSG = 1; printf("pin == NULL || pout==NULL || rnum==NULL 传入参数不可以为空 erro msg:%d ", ERRO_MSG); return ERRO_MSG; } char *pstart = pin; int index = 0; char *temp = strstr(pstart, "AB"); while (temp != NULL){ *temp = '