mblen.c

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

C
21
字号
/* * ansi/stdlib/mblen.c * ANSI/ISO 9899-1990, Section 7.10.7.1. * * int mblen(const char *s, size_t n) * Determine the number of bytes in a multibyte character. * This uses mbtowc(), thus assuming the encoding used is not state-dependent. */#include <stdlib.h>intmblen(const char *s, size_t n){	if (s == NULL)		return 0;		/* encoding is not state-dependent */	return mbtowc((wchar_t *)0, s, n);}/* end of mblen.c */

⌨️ 快捷键说明

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