删除字符串中指定字符

来源:互联网 发布:控制学生手机上网软件 编辑:程序博客网 时间:2024/06/08 03:26
// 删除字符串str中的字符cvoid delchar(char * str, char c){if (NULL != str){for (int i = 0; i < strlen(str); i++){if (str[i] == c){for (int j = i; j < strlen(str); j++){str[j] = str[j + 1];}i = i - 1;}}}}

0 0
原创粉丝点击