PDA

Click to See Complete Forum and Search --> : Easy string conversion (strlwr)


C++Spike
Jun 13th, 2000, 11:31 AM
How do you convert string from upper to lower or from lower to upper or whatever other conversion of that type you need to do. I tried using strlwr, but I'm so dumb that I can't get it to work (it's hard to move from VB to VC++, but unfortunately you have to do it sooner or later - well maybe not completely forget about VB, but... whatever)
Thanks in advance

parksie
Jun 15th, 2000, 12:20 AM
try this:


void myfunc() {
char* pcMyStr = "Here Is Some TEXT!";

strlwr(pcMyStr);

// pcMyStr is now "here is some text!"

printf("%s", pcMyStr);
}