strlst.c
来自「gsac程序包」· C语言 代码 · 共 50 行
C
50 行
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>char strlst(string)char *string;{ while (*string != '\0') { if (*(string+1) == '\0') return(*string); string++;} return('\0');}int trim(s)char *s;{ char *c; while (isspace(*(s + strlen(s) - 1))) *(s + strlen(s) - 1) = '\0'; c = s; while (*c == ' ' && (*c != '\0')) *c++ = *(c + 1); strcpy(s, c); return 1;}/* ---------------------------------------------------------------------- */int str_isnum(s)char *s;{ while(*s) if (!isdigit(*s++)) return 0; return 1;}/* ---------------------------------------------------------------------- */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?