strxfrm.c

来自「基于4个mips核的noc设计」· C语言 代码 · 共 30 行

C
30
字号
#include <string.h>/* * strxfrm(s1, s2, size) : transform a string from "local" form. * * This currently only works for ANSI locale * * The return value 'r' is the size of the transformed * string (w/o the null byte), if r >= n, the contents of s1 are indeterminate. * * (Since the transform is a no-op, r is always strlen(s2)) */size_tstrxfrm(char *s1, const char *s2, size_t n){	int r;	if ( n )		strncpy(s1, s2, n);	r = strlen(s2);	return r;}  

⌨️ 快捷键说明

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