conv.3
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 104 行
3
104 行
.\" SCCSID: @(#)atof.3 2.5 8/10/87.TH conv 3 .SH Nametoupper, tolower, _toupper, _tolower, toascii \- translate characters.SH Syntax.nf.B #include <ctype.h>.PP.B int toupper(\fIc\fP).B int c;.PP.B int tolower(\fIc\fP).B int c;.PP.B int _toupper(\fIc\fP).B int c;.PP.B int _tolower(\fIc\fP).B int c;.PP.B int toascii(\fIc\fP).B int c;.fi.SH Description.NXR "tolower subroutine (standard C)".NXR "toupper subroutine".NXR "_toupper subroutine".NXR "_tolower subroutine".NXR "toacsii subroutine"The functions.PN toupper and.PN tolowerhave as their domain the range of the .PN getcfunction. If the argument to.PN toupperrepresents a lowercase letter, the output from the function is the correspondinguppercase letter. If the argument to.PN tolower represents an uppercase letter, the result is the corresponding lowercase letter..PPThe case of .I c depends on the definition of the character in the language database. Becausethe case of a character can vary between language databases, the case of .I c depends on what language database is in use. Specifically, the case of argumentsdepends on what property tables are associated the LC_CTYPE category.Property tables are associated with the LC_CTYPE category by a successful call tothe .PN setlocalefunction that includes the LC_CTYPE category. If no successful call to defineLC_CTYPE has occurred or if the character case information is unavailable for thelanguage in use, the rules of the ASCII coded character set determine the case of arguments..PPIf the argument to the.PN toupperfunction does not have the uppercase attribute, .PN toupper returns the argument unchanged. Likewise, if the argument to the.PN tolowerfunction does not have the lowercase attribute, .PN tolowerreturns it unchanged..PPThe macros.PN _toupperand .PN _tolowerhave the same affect as .PN toupperand .PN tolower .The difference is that the argument to the macros must be an ASCII character(that is, a character in the domain \-1 to 127) and the argument must have theappropriate case. Arguments to .PN _toupper must have the uppercase attribute and arguments to.PN _tolower must the lowercase attribute. The result of supplying arguments to these macros that are outside the domain or do not have the appropriate case is undefined.These macros operate faster than the .PN toupperand .PN tolowerfunctions..PPThe macro.PN toasciiconverts its argument to the ASCII character set. The macro converts its argument by truncating the numerical representation of the argument so that it is between \-1 and 127. You can use this macro when you move an applicationto a system other than an ULTRIX system..SS International Environment.IP LC_CTYPE 15If this environment variable is set and valid,.PN convuses the international language database named in the definition todetermine character classification rules..SH See Alsoctype(3int), setlocale(3), getc(3)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?