/**编写一个函数。其参数为一个字符串,函数删除字符串中的空格**/
#include<stdio.h>
#include <string.h>
#include<stdlib.h>
#include <ctype.h>
char *DeleteBlank(char *str,int len)
{
char *mPtr = NULL;
int i,j=0;
mPtr = (char *)malloc(sizeof(char)*len+1);
for (i=0;i<len;i++)
{
/****应用了字符函数isspace()****/
if (isspace (str[i]))
continue;
编写一个函数。其参数为一个字符串,函数删除字符串中的空格
最新推荐文章于 2024-02-04 19:26:19 发布