我需要使用toupper
和tolower
但我不知道哪个库包含这个功能。
请帮助我!
最佳答案
在几乎所有环境(包括任何 POSIX 环境)中,这两个函数均由标准 C 库提供 - 即无需链接特定库。相关函数的手册页将向您展示#include
的内容;在 POSIX 上,根据手册页,答案是 ctype.h
:
TOUPPER(3) BSD Library Functions Manual TOUPPER(3)
NAME
toupper, toupper_l -- lower case to upper case letter conversion
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int
toupper(int c);
关于c - toupper 和 tolower 可以使用哪个 C 语言库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33454894/