delspace.c

来自「API」· C语言 代码 · 共 26 行

C
26
字号
#include <stdio.h>
#include <sys/types.h>
#include "db_struct_c.h"

/*
 * Last Modified By Lcm. 1997.09.19 ShangHai
 */

/*
 * Delete the invalid space or tab at the string's tail.
 */

void DelSpace(char *string)
{
	int i;

	if (string == NULL)
		return;
	for (i = strlen(string)-1; i >= 0; i --) {
		if (string[i] != ' ' && string[i] != '\t') break;
	}
	string[i+1] = '\0';
	return;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?