此表简要描述了按字母顺序列出的 C 库函数。 此表提供了包含文件名以及每个函数的函数原型。
表 1. 标准 C 库函数
功能
系统包含文件
函数原型
描述
中止
stdlib.h
空中止 (void abort);
异常停止程序。
abs
stdlib.h
int abs (int n);
计算整数自变量 n的绝对值。
acos
math.h
双 acos (双 x);
计算 x的弧余弦。
asctime
time.h
char * asctime (const struct tm *time);
将存储为结构的 time 转换为字符串。
asctime_r
time.h
char * asctime_r (const struct tm * tm , char * buf);
将存储为结构的 tm 转换为字符串。 (可重新启动的 asctime 版本。)
asin
math.h
双 asin (双 x);
计算 x的反正弦。
断言
assert.h
void 断言 (int expression);
打印诊断消息并在表达式为 false 时结束程序。
atan
math.h
双 atan (双 x);
计算 x的反正切。
atan2
math.h
double atan2(double y, double x);
计算 y/x的反正切。
阿特出口
stdlib.h
int atexit (void (*func) (void));
注册要在正常终止时调用的函数。
阿托
stdlib.h
double atof (const char *string);
将 string 转换为双精度浮点值。
阿托伊
stdlib.h
int atoi (const char *string);
将 string 转换为整数。
阿托尔
stdlib.h
long int atol (const char *string);
将 string 转换为长整数。
搜索
stdlib.h
void * bsearch (const void *key, const void *base, size_t num, size_t size, int (*比较) (const void *element1, const void *element2);
对 num 个元素的数组执行二进制搜索,每个元素的 size 字节。 数组必须按 Compare指向的函数升序排序。
布托克
stdio.h wchar.h
wint_t bTowc (int c);
确定 c 是否构成处于初始移位状态的有效多字节字符。
calloc
stdlib.h
void * calloc (size_t num, size_t size);
为大小为 size的 num 元素数组保留存储空间,并将所有元素的值初始化为 0。
Catclose6
nl_types.h
int catclose (nl_catd catd);
关闭先前打开的消息目录。
catgets6
nl_types.h
char * catgets (nl_catd catd , int set_id , int msg_id , const char * s);
从打开的消息目录检索消息。
catopen6
nl_types.h
nl_catd catopen (const char * name , int oflag);
打开消息目录,必须先完成此操作,然后才能检索消息。
ceil
math.h
双 ceil (双 x);
计算表示大于或等于 x的最小整数的双精度值。
克莱雷尔
stdio.h
void clearerr (FILE *stream);
重置 stream的错误指示符和文件结束指示符。
时钟
time.h
时钟 (空);
返回自作业启动以来经过的处理器时间。
cos
math.h
双 cos (双 x);
计算 x的余弦值。
cosh
math.h
双 cosh (双 x);
计算 x的双曲余弦。
ctime
time.h
char * ctime (const time_t *time);
将 time 转换为字符串。
ctime64
time.h
char *ctime64(const time64_t * time );
将 time 转换为字符串。
ctime_r
time.h
char * ctime_r (const time_t * time , char * buf);
将 time 转换为字符串。 (ctime 的可重新启动版本。)
ctime64_r
time.h
char *ctime64_r(const time64_t * time , char * buf);
将 time 转换为字符串。 ( ctime64的可重新启动版本。)
扩散时间
time.h
双扩散时间 (time_t time2, time_t time1);
计算 time2 与 time1之间的差异。
difftime64
time.h
双 difftime64(time64_t time2, time64_t time1);
计算 time2 与 time1之间的差异。
div
stdlib.h
div_t div (int numerator, int 分母);
计算 分子 除以 分母的商和余数。
ERF
math.h
双 erf (双 x);
计算 x的错误函数。
ERFC
math.h
双 erfc (双 x);
计算 x的大值的错误函数。
退出
stdlib.h
void exit (int status);
正常结束程序。
exp
math.h
双 exp (双 x);
计算浮点自变量 x的指数函数。
法布斯
math.h
双工厂 (双 x);
计算浮点自变量 x的绝对值。
FCLOSE
stdio.h
int fclose (FILE *stream);
关闭指定的 流。
fdopen5
stdio.h
FILE * fdopen (int handle, const char * type);
将输入或输出流与句柄标识的文件相关联。
费福
stdio.h
int feof (FILE *stream);
测试是否为给定 流设置了文件结束标志。
ferror
stdio.h
int ferror (FILE *stream);
在读取或写入 流时测试错误指示符。
fflush1
stdio.h
int fflush (FILE *stream);
写入与输出 stream相关联的缓冲区的内容。
fgetc1
stdio.h
int fgetc (FILE *stream);
从输入 stream中读取单个无符号字符。
fgetpos1
stdio.h
int fgetpos (FILE *stream, fpos_t *pos);
将与 stream 关联的文件指针的当前位置存储到 pos指向的对象中。
fgets1
stdio.h
char * fgets (char *string, int n, FILE *流);
从输入 stream中读取字符串。
fgetwc6
stdio.h wchar.h
wint_t fgetwc (FILE *stream);
从 stream指向的输入流中读取下一个多字节字符。
fgetws6
stdio.h wchar.h
wchar_t * fgetws (wchar_t *wcs, int n, FILE *stream);
将流中的宽字符读取到 wcs指向的数组中。
fileno5
stdio.h
int fileno (FILE * stream);
确定当前与 流关联的文件句柄。
基底
math.h
双层地板 (双 x);
计算表示小于或等于 x的最大整数的浮点值。
法莫德
math.h
双 fmod (双 x,双 y);
计算 x/y的浮点余数。
fopen
stdio.h
FILE * fopen (const char *filename, const char *mode);
打开指定的文件。
Fprintf
stdio.h
int fprintf (FILE *stream, const char *format-string, arg-list);
格式化字符和值并将其打印到输出 stream。
fputc1
stdio.h
int fputc (int c, FILE *流);
将字符打印到输出 stream。
fput1
stdio.h
int fput (const char *string, FILE *stream);
将字符串复制到输出 stream。
fputwc6
stdio.h wchar.h
wint_t fputwc (wchar_t wc, FILE * stream);
将宽字符 wc 转换为多字节字符,并将其写入当前位置的 stream 指向的输出流。
fputws6
stdio.h wchar.h
int fputws (const wchar_t *wcs, FILE * stream);
将宽字符字符串 wcs 转换为多字节字符串,并将其作为多字节字符串写入 stream 。
fread
stdio.h
size_t fread (void *buffer, size_t size, size_t count, FILE *stream);
从输入 流中最多读取 count 个长度为 size 的项,并将它们存储在 buffer中。
可用
stdlib.h
void free (void *ptr);
释放存储块。
自由开放
stdio.h
FILE * freopen (const char *filename, const char *mode, FILE *stream);
关闭 流,并将其重新分配给指定的文件。
弗雷克斯普
math.h
double frexp (double x, int *expptr);
将浮点数分隔为其尾数和指数。
弗斯坎夫
stdio.h
int fscanf (FILE *stream, const char *format-string, arg-list);
将数据从 流 读取到 arg-list给定的位置。
fseek1
stdio.h
int fseek (FILE *stream, long int offset, int origin);
将与 流 关联的当前文件位置更改为新位置。
fsetpos1
stdio.h
int fsetpos (FILE *stream, const fpos_t *pos);
将当前文件位置移动到由 pos确定的新位置。
ftell1
stdio.h
long int ftell (FILE *stream);
获取文件指针的当前位置。
fwide6
stdio.h wchar.h
int fwide (FILE * stream, int mode);
确定 stream指向的流的方向。
fwprintf6
stdio.h wchar.h
int fwprintf (FILE * stream, const wchar_t * format, arg-list);
将输出写入 stream指向的流。
fwrite
stdio.h
size_t fwrite (const void *buffer, size_t size, size_t count, FILE *stream);
将最大长度为 size 的 count 项从 buffer 写入 stream。
fwscanf6
stdio.h wchar.h
int fwscanf (FILE * stream, const wchar_t * format, arg-list)
从 stream指向的流中读取输入。
伽玛
math.h
双伽玛 (双 x);
计算伽玛函数
getc1
stdio.h
int getc (FILE *stream);
从输入 stream中读取单个字符。
getchar1
stdio.h
int getchar (void);
从 stdin 中读取单个字符。
格滕夫
stdlib.h
char * getenv (const char *varname);
在环境变量中搜索 varname。
获取数
stdio.h
char * get (char *buffer);
从 stdin中读取字符串,并将其存储在 buffer中。
getwc6
stdio.h wchar.h
wint_t getwc (FILE * stream);
从 流中读取下一个多字节字符,将其转换为宽字符,并前进 流的关联文件位置指示符。
getwchar6
wchar.h
wint_t getwchar (void);
从 stdin 读取下一个多字节字符,将其转换为宽字符,并推进 stdin 的关联文件位置指示符。
gmtime
time.h
struct tm * gmtime (const time_t *time);
将 time 值转换为 tm 类型的结构。
gmtime64
time.h
struct tm *gmtime64(const time64_t * time);
将 time 值转换为 tm 类型的结构。
gmtime_r
time.h
struct tm * gmtime_r (const time_t * time , struct tm * result);
将 time 值转换为类型为 tm 的结构。 (可重新启动的 gmtime 版本。)
gmtime64_r
time.h
struct tm *gmtime64_r (const time64_t * time , struct tm * result);
将 time 值转换为类型为 tm 的结构。 ( gmtime64的可重新启动版本。)
海锅
math.h
双连字符 (双 side1,双 side2);
计算长度为 side1 和 side2的直角三角形的斜角。
isalnum
ctype.h
int isalnum (int c);
测试 c 是否为字母数字。
isalpha
ctype.h
int isalpha (int c);
测试 c 是否为字母。
isascii4
ctype.h
int isascii (int c);
测试 c 是否在 7 位 US-ASCII 范围内。
ISBLANK
ctype.h
int isblank (int c);
测试 c 是否为空白或制表符。
iscntrl
ctype.h
int iscntrl (int c);
测试 c 是否为控制字符。
isdigit
ctype.h
int isdigit (int c);
测试 c 是否为十进制数字。
isgraph
ctype.h
int isgraph (int c);
测试 c 是否为可打印字符 (不包括空格)。
islower
ctype.h
int islower (int c);
测试 c 是否为小写字母。
isprint
ctype.h
int isprint (int c);
测试 c 是否是包含空格的可打印字符。
ispunct
ctype.h
int is标点 (int c);
测试 c 是否为标点字符。
isspace
ctype.h
int isspace (int c);
测试 c 是否为空格字符。
isupper
ctype.h
int isupper (int c);
测试 c 是否为大写字母。
iswalnum4
wctype.h
int iswalnum (wint_t wc);
检查是否存在任何字母数字宽字符。
iswalpha4
wctype.h
int iswalpha (wint_t wc);
检查是否存在任何字母宽字符。
iswblank4
wctype.h
int iswblank (wint_t wc);
检查是否存在任何空白字符或制表符宽字符。
iswcntrl4
wctype.h
int iswcntrl (wint_t wc);
测试任何控制宽字符。
iswctype4
wctype.h
int iswctype (wint_t wc , wctype_t wc_prop);
确定宽字符 wc 是否具有属性 wc_prop。
Iswdigit4
wctype.h
int iswdigit (wint_t wc);
检查是否存在任何十进制数字的宽字符。
iswgraph4
wctype.h
int iswgraph (wint_t wc);
检查是否存在除宽字符空间以外的任何打印宽字符。
iswlower4
wctype.h
int iswlower (wint_t wc);
检查是否存在任何小写的宽字符。
iswprint4
wctype.h
int iswprint (wint_t wc);
检查是否存在任何打印宽字符。
isw标点4
wctype.h
int isw标点 (wint_t wc);
测试宽的非字母数字字符和非空格字符。
iswspace4
wctype.h
int iswspace (wint_t wc);
检查是否存在与实现定义的宽字符集 (iswalnum 为 false) 对应的任何宽字符。
iswupper4
wctype.h
int iswupper (wint_t wc);
检查是否存在任何大写的宽字符。
iswxdigit4
wctype.h
int iswxdigit (wint_t wc);
检查是否存在任何十六进制数字字符。
isxdigit4
wctype.h
int isxdigit (int c);
测试 c 是否为十六进制数字。
j0
math.h
双 j0(double x);
计算第一类顺序 0 的 Bessel 函数值。
j1
math.h
双 j1(double x);
计算第一类顺序 1 的 Bessel 函数值。
仁
math.h
double jn (int n, double x);
计算第一类顺序 n的 Bessel 函数值。
实验
stdlib.h
long int labs (long int n);
计算 n的绝对值。
勒德塞普
math.h
双 ldexp (double x, int exp);
返回 x 乘以 (2 的幂 exp) 的值。
勒迪夫
stdlib.h
ldiv_t ldiv (long int numerator, long int 分母);
计算 分子/分母的商和余数。
localeconv
locale.h
struct lconv * localeconv (void);
根据当前语言环境格式化 struct lconv 中的数字数量。
localtime
time.h
struct tm * localtime (const time_t *timeval);
将 timeval 转换为 tm 类型的结构。
localtime64
time.h
struct tm *localtime64(const time64_t * timeval );
将 timeval 转换为 tm 类型的结构。
localtime_r
time.h
struct tm * localtime_r (const time_t * timeval , struct tm * result);
将 time 值转换为类型为 tm的结构。 (localtime 的可重新启动版本。)
localtime64_r
time.h
struct tm *localtime64_r (const time64_t * timeval , struct tm * result);
将 time 值转换为类型为 tm的结构。 ( localtime64的可重新启动版本。)
记录
math.h
双对数 (双 x);
计算 x的自然对数。
log10
math.h
双 log10(double x);
计算 x的以 10 为底的对数。
朗杰普
setjmp.h
void longjmp (jmp_buf env, int value);
复原先前由 setjmp 函数在 env 中设置的堆栈环境。
malloc
stdlib.h
void * malloc (size_t size);
保留一个存储器块。
mblen
stdlib.h
int mblen (const char *string, size_t n);
确定多字节字符 string的长度。
mbrlen4
wchar.h
int mbrlen (const char * s , size_t n , mbstate_t * ps);
确定多字节字符的长度。 (可重新启动的 mblen 版本。)
mbrTowc4
wchar.h
int mbrTowc (wchar_t * pwc , const char * s , size_t n , mbstate_t * ps);
将多字节字符转换为宽字符 (可重新启动的 mbTowc 版本)
mbsinit4
wchar.h
int mbsinit (const mbstate_t * ps);
测试状态对象 * ps 以获取初始状态。
mbsrTowcs4
wchar.h
size_t mbsrTowc (wchar_t * dst , const char ** src , size_t len , mbstate_t * ps);
将多字节字符串转换为宽字符字符串。 (可重新启动的 mbstowcs 版本。)
mbstowcs
stdlib.h
size_t mbstowcs (wchar_t *pwc, const char *string, size_t n);
将 string 中的多字节字符转换为其对应的 wchar_t 代码,并在 pwc中存储不超过 n 个代码。
mbtowc
stdlib.h
int mbTowc (wchar_t *pwc, const char *string, size_t n);
将对应于多字节字符 string 的前 n 字节的 wchar_t 代码存储到 wchar_t 字符 pwc中。
梅姆奇尔
string.h
void * memchr (const void *buf, int c, size_t count);
搜索 buf 的前 count 个字节,以查找第一次出现的转换为无符号字符的 c 。
梅姆奇普
string.h
int memcmp (const void *buf1, const void *buf2, size_t count);
将 buf1 和 buf2的 count 个字节进行比较。
梅姆奇皮
string.h
void * memcpy (void *dest, const void *src, size_t count);
将 src 的 count 字节复制到 dest。
门移动
string.h
void * memmove (void *dest, const void *src, size_t count);
将 src 的 count 字节复制到 dest。 允许在重叠的对象之间进行复制。
梅姆集
string.h
void * memset (void *dest, int c, size_t count);
将 dest 的 count 个字节设置为值 c。
姆卡时间
time.h
time_t mktime (struct tm *time);
将本地 time 转换为日历时间。
mktime64
time.h
time64_t mktime64(struct tm * 时间 );
将本地 time 转换为日历时间。
莫德夫
math.h
double modf (double x, double *intptr);
将浮点值 x 分解为小数部分和整数部分。
纽克塔夫特
math.h
双 nextafter (双 x,双 y);
按 y的方向计算 x 之后的下一个可表示值。
内克塔夫泰尔
math.h
long double nextafterl (long double x, long double y);
按 y的方向计算 x 之后的下一个可表示值。
下图
math.h
双下向 (双 x,长双 y);
按 y的方向计算 x 之后的下一个可表示值。
下托瓦尔德尔
math.h
long double nexttowardl (long double x, long double y);
按 y的方向计算 x 之后的下一个可表示值。
nl_langinfo4
langinfo.h
char * nl_langinfo (nl_item 项);
从当前语言环境中检索描述由 项指定的请求信息的字符串。
佩罗尔
stdio.h
void perror (const char *string);
将错误消息打印到 stderr。
POW
math.h
双 pow (双 x,双 y);
计算 x 的幂 y的值。
printf
stdio.h
int printf (const char *format-string, arg-list);
将字符和值格式化并打印到标准输出。
putc1
stdio.h
int putc (int c, FILE *流);
将 c 打印到输出 stream。
输入字符 1
stdio.h
int putchar (int c);
将 c 打印到 stdout。
普滕夫
stdlib.h
int * putenv (const char *varname);
通过改变现有变量或创建新变量来设置环境变量的值。
放
stdio.h
int put (const char *string);
将字符串打印到 stdout。
putwc6
stdio.h wchar.h
wint_t putwchar (wchar_t wc, FILE * stream);
将宽字符 wc 转换为多字节字符,并在当前位置将其写入流。
putwchar6
wchar.h
wint_t putwchar (wchar_t wc);
将宽字符 wc 转换为多字节字符并将其写入标准输出。
格排序
stdlib.h
void qsort (void *base, size_t num, size_t width, int (*比较) (const void *element1, const void *element2));
执行 num 个元素的快速排序,每个元素的大小为 width 字节。
quantexpd32
math.h
_Decimal32 quantized32(_Decimal32 x, _Decimal32 y);
计算单精度十进制浮点值的量子指数。
quantexpd64
math.h
_Decimal64 quantized64(_Decimal64 x, _Decimal64 y);
计算双精度十进制浮点值的量子指数。
quantexpd128
math.h
_Decimal128 quantized128(_Decimal128 x, _Decimal128 y);
计算四精度十进制浮点值的量子指数。
quantized32
math.h
int quantexpd32(_Decimal32 x );
将单精度十进制浮点值的量子指数设置为另一个单精度十进制浮点值的量子指数。
quantized64
math.h
int quantexpd64(_Decimal64 x );
将双精度十进制浮点值的量子指数设置为另一个双精度十进制浮点值的量子指数。
quantized128
math.h
int quantexpd128(_Decimal128 x );
将四精度十进制浮点值的量子指数设置为另一个四精度十进制浮点值的量子指数。
samequantumd32
math.h
__bool__ samequantumd32(_Decimal32 x, _Decimal32 y);
确定两个单精度十进制浮点值的量子指数是否相同。
samequantumd64
math.h
__bool__ samequantumd64(_Decimal64 x, _Decimal64 y);
确定两个双精度十进制浮点值的量子指数是否相同。
samequantumd128
math.h
__bool__ samequantumd128(_Decimal128 x, _Decimal128 y);
确定两个四精度十进制浮点值的量子指数是否相同。
引发
signal.h
int 引发 (int sig);
将信号 sig 发送到正在运行的程序。
rand
stdlib.h
int rand (void);
返回伪随机整数。
rand_r
stdlib.h
int rand_r (void);
返回伪随机整数。 (可重新启动版本)
realloc
stdlib.h
void * realloc (void *ptr, size_t size);
更改先前保留的存储块的 大小 。
雷戈姆
regex.h
int regcomp (regex_t * preg, const char * pattern, int cflags);
将 pattern 指向的源正则表达式编译为可执行版本,并将其存储在 preg指向的位置。
雷格错误
regex.h
size_t regerror (int errcode, const regex_t * preg, char * errbuf, size_t errbuf_size);
查找正则表达式 preg的错误代码 errcode 的描述。
雷格埃克
regex.h
int regexec (const regex_t * preg, const char * string, size_t nmatch, regmatch_t * pmatch, int eflags);
将 null 结束的字符串 string 与编译的正则表达式 preg 进行比较,以查找两者之间的匹配。
雷格自由
regex.h
void regfree (regex_t * preg);
释放 regcomp 分配的任何内存以实现正则表达式 preg。
移除
stdio.h
int remove (const char *filename);
删除由 filename指定的文件。
重命名
stdio.h
int rename (const char *oldname, const char *newname);
重命名指定的文件。
倒带1
stdio.h
void rewind (FILE *stream);
将与 stream 关联的文件指针重新定位到文件的开头。
scanf
stdio.h
int scanf (const char *format-string, arg-list);
将数据从 stdin 读取到 arg-list给出的位置。
塞特布夫
stdio.h
void setbuf (FILE *stream, char *buffer);
控制 流的缓冲。
塞杰普
setjmp.h
int setjmp (jmp_buf env);
保存可随后由 longjmp 复原的堆栈环境。
setlocale
locale.h
char * setlocale (int category, const char *locale);
更改或查询在 语言环境中定义的变量。
塞特夫布夫
stdio.h
int setvbuf (FILE *stream, char *buf, int type, size_t size);
控制 流的缓冲和缓冲区 大小 。
信号
signal.h
void (* signal (int sig, void (*func) (int))) (int);
将 func 注册为信号 sig 的信号处理程序。
sin
math.h
双 sin (双 x);
计算 x的正弦。
sinh
math.h
双 sinh (双 x);
计算 x的双曲正弦。
斯纳版夫
stdio.h
int snprintf (char * outbuf , size_t n , const char * , ...)
与 sprintf 相同,但函数将在将 n 个字符写入 outbuf 后停止。
斯平特夫
stdio.h
int sprintf (char *buffer, const char *format-string, arg-list);
在 buffer中格式化并存储字符和值。
开方
math.h
双平方 (双 x);
计算 x的平方根。
斯兰德
stdlib.h
void srand (unsigned int seed);
设置伪随机数字生成器的 种子 。
斯坎夫
stdio.h
int sscanf (const char *buffer, const char *format, arg-list);
将数据从 buffer 读取到 arg-list给出的位置。
斯特卡塞普
strings.h
int srtcasecmp (const char *string1, const char *string2);
比较不区分大小写的字符串。
斯特尔卡特
string.h
char * strcat (char *string1, const char *string2);
将 string2 连接到 string1。
斯特彻尔
string.h
char * strchr (const char *string, int c);
查找 string中第一次出现的 c 。
斯特尔克普
string.h
int strcmp (const char *string1, const char *string2);
将 string1 的值与 string2进行比较。
斯特科尔
string.h
int strcoll (const char *string1, const char *string2);
使用当前语言环境中的整理顺序来比较两个字符串。
斯特尔奇皮
string.h
char * strcpy (char *string1, const char *string2);
将 string2 复制到 string1中。
斯特尔肯
string.h
size_t strcspn (const char *string1, const char *string2);
返回 string1 的初始子串的长度,该子串由 string2中未包含的字符组成。
strerror
string.h
char * strerror (int errnum);
将 errnum 中的错误号映射到错误消息字符串。
strfmon4
wchar.h
int strfmon (char * s , size_t maxsize , const char * format , ...);
将货币值转换为字符串。
斯特尔夫特
time.h
size_t strftime (char *dest, size_t maxsize, const char *format, const struct tm *timeptr);
根据由 format确定的字符串,将字符存储在由 dest指向的数组中。
斯特伦
string.h
size_t strlen (const char *string);
计算 string的长度。
斯特恩卡塞普
strings.h
int strncasecmp (const char *string1, const char *string2, size_t count);
比较不区分大小写的字符串。
斯特恩卡特
string.h
char * strncat (char *string1, const char *string2, size_t count);
最多将 string2 的 count 个字符连接到 string1。
斯特恩普
string.h
int strncmp (const char *string1, const char *string2, size_t count);
比较 string1 和 string2的 count 个字符。
斯特恩奇皮
string.h
char * strncpy (char *string1, const char *string2, size_t count);
最多将 string2 的 count 个字符复制到 string1。
斯特普布尔克
string.h
char * strpbrk (const char *string1, const char *string2);
查找 string1 中首次出现的 string2中的任何字符。
strptime4
time.h
char * strptime (const char * buf , const char * format , struct tm * tm);
日期和时间转换
斯特尔奇尔
string.h
char * strrchr (const char *string, int c);
查找 string中最后出现的 c 。
斯特尔斯滕
string.h
size_t strspn (const char *string1, const char *string2);
返回 string1 的初始子串的长度,该子串由 string2中包含的字符组成。
斯特斯特尔
string.h
char * strstr (const char *string1, const char *string2);
返回指向 string1中首次出现的 string2 的指针。
斯特尔托德
stdlib.h
双 strtod (const char *nptr, char **endptr);
将 nptr 转换为双精度值。
strtod32
stdlib.h
_Decimal32 strtod32(const char *nptr, char **endptr);
将 nptr 转换为单精度十进制浮点值。
strtod64
stdlib.h
_Decimal64 strtod64(const char *nptr, char **endptr);
将 nptr 转换为双精度十进制浮点值。
strtod128
stdlib.h
_Decimal128 strtod128(const char *nptr, char **endptr);
将 nptr 转换为四精度十进制浮点值。
斯特尔托夫
stdlib.h
float strtof (const char *nptr, char **endptr);
将 nptr 转换为浮点值。
strtok
string.h
char * strtok (char *string1, const char *string2);
查找 string1 中由 string2中的下一个字符定界的下一个标记。
strtok_r
string.h
char * strtok_r (char *string, const char *seps, char **持久);
查找 string 中由 seps中的下一个字符定界的下一个标记。 (可重新启动的 strtok 版本。)
斯特托尔
stdlib.h
long int strtol (const char *nptr, char **endptr, int base);
将 nptr 转换为带符号的长整数。
斯特尔特
stdlib.h
长整型 (const char *nptr, char **endptr);
将 nptr 转换为长整型双精度值。
斯特图尔
stdlib.h
无符号长整型 int strtoul (const char *string1, char **string2, int base);
将 string1 转换为无符号长整数。
斯特克斯弗尔姆
string.h
size_t strxfrm (char *string1, const char *string2, size_t count);
转换 string2 并将结果放在 string1中。 转换由程序的当前语言环境确定。
瑞士 f
wchar.h
int swprintf (wchar_t * wcsbuffer, size_t n, const wchar_t * format, arg-list);
将一系列宽字符和值格式化并存储到宽字符缓冲区 wcsbuffer中。
斯坎夫
wchar.h
int swscanf (const wchar_t * buffer, const wchar_t * format, arg-list)
将数据从 缓冲区 读取到 arg-list提供的位置。
系统
stdlib.h
int 系统 (const char *string);
将 string 传递到系统命令分析器。
tan
math.h
双 tan (双 x);
计算 x的正切。
tanh
math.h
双 tanh (双 x);
计算 x的双曲正切。
时间
time.h
time_t time (time_t *timeptr);
返回当前日历时间。
time64
time.h
time64_t time64(time64_t * timeptr );
返回当前日历时间。
tmpfile
stdio.h
FILE * tmpfile (void);
创建临时二进制文件并将其打开。
坦姆南
stdio.h
char * tmpnam (char *string);
生成临时文件名。
toascii
ctype.h
int toascii (int c);
将 c 转换为 7 位 US-ASCII 字符集中的字符。
tolower
ctype.h
int tolower (int c);
将 c 转换为小写。
toupper
ctype.h
int toupper (int c);
将 c 转换为大写。
塔奇特
wctype.h
wint_t Towctrans (wint_t wc, wctrans_t desc);
根据 desc描述的映射转换宽字符 wc 。
塔下4
wctype.h
wint_t Towlower (wint_t wc);
将大写字母转换为小写字母。
塔上方4
wctype.h
wint_t 上塔 (wint_t wc);
将小写字母转换为大写字母。
ungetc1
stdio.h
int ungetc (int c, FILE *流);
将 c 推送回输入 流。
ungetwc6
stdio.h wchar.h
wint_t ungetwc (wint_t wc, FILE * stream);
将宽字符 wc 推送回输入流。
瓦阿尔格
stdarg.h
var_type va_arg (va_list arg_ptr, var_type);
返回一个自变量的值,并修改 arg_ptr 以指向下一个自变量。
va_copy
stdarg.h
void va_copy(va_list dest, va_list src);
将 dest 初始化为 src的副本。
va_end
stdarg.h
void va_end (va_list arg_ptr );
促进变量自变量列表处理的正常返回。
va_start
stdarg.h
void va_start(va_list arg_ptr , variable_name);
初始化 arg_ptr 以供 va_arg 和 va_end后续使用。
Vfprintf
stdio.h stdarg.h
int vfprintf (FILE *stream, const char *format, va_list arg_ptr);
使用可变数目的自变量将字符格式化并打印到输出 流 。
弗斯坎夫
stdio.h stdarg.h
int vfscanf (FILE * stream, const char * format, va_list arg_ptr);
将数据从指定的流读取到由可变数目的自变量给定的位置。
vfwprintf6
stdarg.h stdio.h wchar.h
int vfwprintf (FILE * stream, const wchar_t * format, va_list arg);
等同于 fwprintf ,只不过变量自变量列表被替换为 arg。
弗夫斯坎夫
stdio.h stdarg.h
int vfwscanf (FILE * stream, const wchar_t * format, va_list arg_ptr);
将指定流中的宽数据读取到由可变数目的自变量给定的位置。
Vprintf
stdio.h stdarg.h
int vprintf (const char *format, va_list arg_ptr);
使用可变数量的自变量将字符格式化并打印到 stdout。
弗斯坎夫
stdio.h stdarg.h
int vscanf (const char * format, va_list arg_ptr);
将数据从 stdin 读取到由可变数目的自变量给定的位置。
弗斯普林特夫
stdio.h stdarg.h
int vsprintf (char *target-string, const char *格式, va_list arg_ptr);
使用可变数量的参数对缓冲区中的字符进行格式化和存储。
Vsnprintf
stdio.h
int vsnprintf (char * outbuf , size_t n , const char * , va_list);
与 vsprintf 相同,但函数将在将 n 个字符写入 outbuf 后停止。
弗斯坎夫
stdio.h stdarg.h
int vsscanf (const char* buffer, const char * format, va_list arg_ptr);
将数据从缓冲区读取到由可变数目的自变量给定的位置。
Vswprintf
stdarg.h wchar.h
int vswprintf (wchar_t * wcsbuffer, size_t n, const wchar_t * format, va_list arg);
将一系列宽字符和值格式化并存储在缓冲区 wcsbuffer中。
弗斯坎夫
stdio.h wchar.h
int vswscanf (const wchar_t * buffer, const wchar_t * format, va_list arg_ptr);
将宽数据从缓冲区读取到由可变数目的自变量给定的位置。
vwprintf6
stdarg.h wchar.h
int vwprintf (const wchar_t * format, va_list arg);
相当于 wprintf ,只不过变量自变量列表被 arg替换了。
弗斯坎夫
stdio.h wchar.h
int vwscanf (const wchar_t * format, va_list arg_ptr);
将宽数据从 stdin 读取到由可变数目的自变量提供的位置。
wcrtomb4
wchar.h
int wcrtomb (char * s , wchar_t wchar , mbstate_t * pss);
将宽字符转换成多字节字符。 (wctomb 的可重新启动版本。)
Wcscat
wchar.h
wchar_t * wcscat (wchar_t *string1, const wchar_t *string2);
将 string2 所指向的字符串的副本附加到 string1所指向的字符串的末尾。
Wcschr
wchar.h
wchar_t * wcschr (const wchar_t * string, wchar_t character);
搜索 string 指向的宽字符字符串以查找出现的 character。
wcscmp
wchar.h
int wcscmp (const wchar_t *string1, const wchar_t *string2);
比较两个宽字符字符串 *string1 和 *string2。
wcscoll4
wchar.h
int wcscoll (const wchar_t *wcs1, const wchar_t *wcs2);
使用当前语言环境中的整理顺序来比较两个宽字符字符串。
wcscpy
wchar.h
wchar_t * wcscpy (wchar_t *string1, const wchar_t *string2);
将 *string2 (包括结束 wchar_t 空字符) 的内容复制到 *string1中。
Wcscspn
wchar.h
size_t wcscspn (const wchar_t *string1, const wchar_t *string2);
确定 *string1 所指向的字符串的初始段中未出现在 *string2所指向的字符串中的 wchar_t 字符数。
Wcsftime
wchar.h
size_t wcsftime (wchar_t * wdest, size_t maxsize, const wchar_t * format, const struct tm * timeptr);
将 timeptr 结构中的时间和日期规范转换为宽字符字符串。
wcslen
wchar.h
size_t wcslen (const wchar_t * string);
计算 string指向的字符串中的宽字符数。
wcslocaleconv
locale.h
struct wcslconv * wcslocaleconv (void);
根据当前语言环境,格式化 struct wcslconv 中的数字数量。
Wcsncat
wchar.h
wchar_t * wcsncat (wchar_t *string1, const wchar_t *string2, size_t count);
将最多 count 个宽字符从 string2 追加到 string1的末尾,并将 wchar_t 空字符追加到结果中。
wcsncmp
wchar.h
int wcsncmp (const wchar_t *string1, const wchar_t *string2, size_t count);
将 string1 中的 count 个宽字符与 string2进行比较。
Wcsncpy
wchar.h
wchar_t * wcsncpy (wchar_t *string1, const wchar_t *string2, size_t count);
将最多 count 个宽字符从 string2 复制到 string1。
Wcspbrk
wchar.h
wchar_t * wcspbrk (const wchar_t *string1, const wchar_t *string2);
查找由 string1 指向的字符串中第一次出现的由 string2指向的字符串中的任何宽字符。
Wcsptime
wchar.h
wchar_t * wcsptime (const wchar_t * buf , const wchar_t * format , struct tm * tm);
日期和时间转换。 相当于 strptime () ,只不过它使用宽字符。
Wcsrchr
wchar.h
wchar_t * wcsrchr (const wchar_t * string, wchar_t character);
查找 string指向的字符串中最后出现的 character 。
wcsrtombs4
wchar.h
size_t wcsrtombs (char * dst , const wchar_t ** src , size_t len , mbstate_t * ps);
将宽字符串转换为多字节字符串。 (wcstombs 的可重新启动版本。)
Wcsspn
wchar.h
size_t wcsspn (const wchar_t *string1, const wchar_t *string2);
计算 string1所指向的字符串的初始段中的宽字符数,该字符串完全由 string2所指向的字符串中的宽字符组成。
Wcsstr
wchar.h
wchar_t * wcsstr (const wchar_t *wcs1, const wchar_t *wcs2);
在 wcs1中查找第一次出现的 wcs2 。
wcstod
wchar.h
双 wcstod (const wchar_t * nptr, wchar_t ** endptr);
将 nptr 指向的宽字符字符串的初始部分转换为双精度值。
wcstod32
wchar.h
_Decimal32 wcstod32(const wchar_t * nptr, wchar_t ** endptr);
将 nptr 指向的宽字符字符串的初始部分转换为单精度十进制浮点值。
wcstod64
wchar.h
_Decimal64 wcstod64(const wchar_t * nptr, wchar_t ** endptr);
将 nptr 指向的宽字符字符串的初始部分转换为双精度十进制浮点值。
wcstod128
wchar.h
_Decimal128 wcstod128(const wchar_t * nptr, wchar_t ** endptr);
将 nptr 指向的宽字符字符串的初始部分转换为四精度十进制浮点值。
Wcstof
wchar.h
float wcstof (const wchar_t * nptr, wchar_t ** endptr);
将 nptr 指向的宽字符字符串的初始部分转换为浮点值。
wcstok
wchar.h
wchar_t * wcstok (wchar_t *wcs1, const wchar_t *wcs2, wchar_t ** ptr)
将 wcs1 拆分为一系列标记,每个标记由 wcs2指向的宽字符串中的宽字符定界。
wcstol
wchar.h
long int wcstol (const wchar_t * nptr, wchar_t ** endptr, int base);
将 nptr 指向的宽字符字符串的初始部分转换为长整数值。
Wcstold
wchar.h
long double wcstold (const wchar_t * nptr, wchar_t ** endptr);
将 nptr 指向的宽字符字符串的初始部分转换为长整型双精度值。
wcstombs
stdlib.h
size_t wcstombs (char * dest , const wchar_t *string, size_t count);
将 wchar_t string 转换为多字节字符串 dest。
wcstoul
wchar.h
unsigned long int wcstoul (const wchar_t * nptr, wchar_t ** endptr, int base);
将 nptr 指向的宽字符字符串的初始部分转换为无符号长整数值。
wcsxfrm4
wchar.h
size_t wcsxfrm (wchar_t *wcs1, const wchar_t *wcs2, size_t n);
将宽字符字符串转换为表示字符整理权重的值,并将生成的宽字符字符串放入数组中。
Wctob
stdarg.h wchar.h
int wctob (wint_t wc);
确定当处于初始移位状态时, wc 是否对应于其多字节字符表示为单字节的扩展字符集的成员。
wctomb
stdlib.h
int wctomb (char *string, wchar_t character);
将 character 的 wchar_t 值转换为多字节 string。
Wctrans
wctype.h
wctrans_t wctrans (const char * property);
构造类型为 wctrans_t 的值,该值描述字符串参数属性所标识的宽字符之间的映射。
wctype4
wchar.h
wctype_t wctype (const char * property);
获得字符属性分类的句柄。
wcwidth
wchar.h
int wcswidth (const wchar_t * pwcs, size_t n);
确定宽字符串的显示宽度。
Wmemchr
wchar.h
wchar_t * wmemchr (const wchar_t * s, wchar_t c, size_t n);
在 S。 指向的对象的初始 N 宽字符中找到第一次出现的 C
Wmemcmp
wchar.h
int wmemcmp (const wchar_t *s1, const wchar_t *s2, size_t n);
将 s1 指向的对象的前 n 个宽字符与 s2指向的对象的前 n 个字符进行比较。
Wmemcpy
wchar.h
wchar_t * wmemcpy (wchar_t *s1, const wchar_t *s2, size_t n);
将 n 宽字符从 s2 指向的对象复制到 s1指向的对象。
Wmemmove
wchar.h
wchar_t * wmemmove (wchar_t *s1, const wchar_t *s2, size_t n);
将 n 宽字符从 s2 指向的对象复制到 s1指向的对象。
Wmemset
wchar.h
wchar_t * wmemset (wchar_t * s, wchar_t c, size_t n);
将 c 的值复制到由 s指向的对象的前 n 个宽字符中。
wprintf6
wchar.h
int wprintf (const wchar_t * format, arg-list);
相当于 fwprintf ,在 wprintf 的自变量之前插入了自变量 stdout。
wscanf6
wchar.h
int wscanf (const wchar_t * format, arg-list);
相当于 fwscanf ,在 wscanf 的自变量之前插入自变量 stdin。
y0
math.h
double y0(double x );
计算第二种顺序 0 的 Bessel 函数值。
y1
math.h
双 y1(double x);
计算第二种顺序 1 的 Bessel 函数值。
YN
math.h
double yn (int n, double x);
计算第二类阶 n 的 Bessel 函数值。
注: 1 使用 type=record 打开的文件不支持此功能。
注: 2 使用 type=record 和 mode=ab + , rb + 或 wb + 打开的文件不支持此函数。
注: 3 ILE C 编译器仅支持完全缓冲流和行缓冲流。 由于块和行等于打开的文件的记录长度,因此以相同方式支持完全缓冲的流和行缓冲的流。 setbuf() 和 setvbuf() 函数没有任何作用。
注: 4 当在编译命令中指定 LOCALETYPE (*CLD) 时,此函数不可用。
注: 5 仅当在 CRTCMOD 或 CRTBNDC 命令上指定 SYSIFCOPT (*IFSIO) 时,此功能才可用。
注: 6 当在编译命令上指定 LOCALETYPE (*CLD) 或 SYSIFCOPT (*NOIFSIO) 时,此功能不可用。