This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: strupr
- From: "Rupert Wood" <me at rupey dot net>
- To: "'Paul Gignoux'" <Paul dot Gignoux at wanadoo dot fr>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 23 Aug 2002 16:42:25 +0100
- Subject: 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.