xstrdup.c
来自「一个C语言写的快速贝叶斯垃圾邮件过滤工具」· C语言 代码 · 共 18 行
C
18 行
/* (C) 2002 by Matthias Andree, redistributable according to the terms * of the GNU General Public License, v2. * * $Id: xstrdup.c,v 1.4 2004/02/25 04:51:58 relson Exp $ * */#include <string.h>#include "xmalloc.h"#include "xstrdup.h"char *xstrdup(const char *s) { size_t l = strlen(s) + 1; char *t = xmalloc(l); memcpy(t, s, l); return t;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?