Updown

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Updown as PDF for free.

More details

  • Words: 124
  • Pages: 1
//************************************** // // 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;

Related Documents

Updown
November 2019 2