You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,28 +26,24 @@ The **`to`** functions and macro conversions are as follows.
27
26
|`_toupper`|`_toupper`| Converts `c` to uppercase |
28
27
|`towupper`| None | Converts c to corresponding wide-character uppercase letter |
29
28
30
-
To use the function versions of the **`to`** routines that are also defined as macros, either remove the macro definitions with `#undef` directives or don't include CTYPE.H. If you use the /Za compiler option, the compiler uses the function version of `toupper` or `tolower`. Declarations of the `toupper` and `tolower` functions are in STDLIB.H.
29
+
To use the function versions of the **`to`** routines that are also defined as macros, either remove the macro definitions with `#undef` directives or don't include `CTYPE.H`. If you use the /Za compiler option, the compiler uses the function version of `toupper` or `tolower`. Declarations of the `toupper` and `tolower` functions are in `STDLIB.H`.
31
30
32
31
The `__toascii` routine sets all but the low-order 7 bits of `c` to 0, so that the converted value represents a character in the ASCII character set. If `c` already represents an ASCII character, `c` is unchanged.
33
32
34
33
The `tolower` and `toupper` routines:
35
34
36
35
- Are dependent on the `LC_CTYPE` category of the current locale (`tolower` calls `isupper` and `toupper` calls `islower`).
37
-
38
36
- Convert `c` if `c` represents a convertible letter of the appropriate case in the current locale and the opposite case exists for that locale. Otherwise, `c` is unchanged.
39
37
40
38
The `_tolower` and `_toupper` routines:
41
39
42
40
- Are locale-independent, much faster versions of `tolower` and **toupper.**
43
-
44
41
- Can be used only when **isascii(**`c`**)** and either **isupper(**`c`**)** or **islower(**`c`**)**, respectively, are nonzero.
45
-
46
42
- Have undefined results if `c` isn't an ASCII letter of the appropriate case for converting.
47
43
48
44
The `towlower` and `towupper` functions return a converted copy of `c` if and only if both of the following conditions are nonzero. Otherwise, `c` is unchanged.
49
45
50
46
-`c` is a wide character of the appropriate case (that is, for which `iswupper` or **iswlower,** respectively, is nonzero).
51
-
52
47
- There's a corresponding wide character of the target case (that is, for which `iswlower` or **iswupper,** respectively, is nonzero).
53
48
54
49
## Example
@@ -63,6 +58,7 @@ The `towlower` and `towupper` functions return a converted copy of `c` if and on
63
58
64
59
#include<ctype.h>
65
60
#include<string.h>
61
+
#include<stdio.h>
66
62
67
63
char msg[] = "Some of THESE letters are Uppercase.";
68
64
char *p;
@@ -92,5 +88,5 @@ sOME OF these LETTERS ARE uPPERCASE.
0 commit comments