ids.c
来自「传说中的c语言四书五经:一、The C Programming Language」· C语言 代码 · 共 22 行
C
22 行
static char rcsid[] = "$Id: H:/drh/idioms/book/RCS/str.doc,v 1.10 1996/06/26 23:02:01 drh Exp $";
#include <stdlib.h>
#include <stdio.h>
#include "fmt.h"
#include "str.h"
int main(int argc, char *argv[]) {
char line[512];
static char set[] = "0123456789_"
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Fmt_register('S', Str_fmt);
while (fgets(line, sizeof line, stdin) != NULL) {
int i = 1, j;
while ((i = Str_upto(line, i, 0, &set[10])) > 0){
j = Str_many(line, i, 0, set);
Fmt_print("%S\n", line, i, j);
i = j;
}
}
return EXIT_SUCCESS;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?