home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
drdobbs
/
1991
/
10
/
string
/
stricase.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-30
|
449b
|
23 lines
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <string.hpp>
String String::upper() const
{
String t(body(),length());
char *p = t.body();
for (int i = 0; i < length(); ++i, ++p)
*p = toupper(*p);
return t;
}
String String::lower() const
{
String t(body(), length());
char *p = t.body();
for (int i = 0; i < length(); ++i, ++p)
*p = tolower(*p);
return t;
}