//************************************** // // name: convert uppercase string to low // er case string // description:just what the title says. // convert upper to lower case. // by: josh nixon // // assumes:just what the title says. con // vert upper to lower case. // //this code is copyrighted and has// limited warranties.please see http:// // www.planet-source-code.com/vb/scripts/sh // owcode.asp?txtcodeid=4114&lngwid=3//for details.//************************************** // void string::strlwr(char* mainstring, char *output) { int len = strlen(mainstring), index; for(int i = 0; i < len; i++) { if( (int)mainstring[i] < 65) output[i] = mainstring[i]; if( (int)mainstring[i] >= 65 && (int)mainstring[i] <= 90) output[i] = (char)mainstring[i] + 32; if( (int)mainstring[i] >= 97 && (int)mainstring[i] <= 122) output[i] = (char)mainstring[i]; if( (int)mainstring[i] > 122) output[i] = mainstring[i]; index++; } }
output[index] = 0;