This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: strupr


Paul Gignoux wrote:

> is the function strupr() available in a c++ programm and (if yes) what
> is the include file ?

This depends upon your C library and not your compiler. If you're using
a unix system, try 'man strupr'.

However, as far as I can see, it's not defined on Solaris or Linux, or
in the C standard or in libiberty. I think it's a Microsoft invention,
sorry.

You can implement it yourself by scanning the string and using toupper()
- or, if you're only working in ASCII, by adding/subtracting 'a'-'A' =
32 for 'a'<=char<='z'. If you've got a Visual C++ install at hand then
you can see how they do it in crt\src\strupr.c, but beware that they use
OS-specific locale functions and globals.

Rup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]