Today I had to do some work and write 4 small script for a commercial I am working on. The client sent me 4 scripts he liked all written in UPPER CASE and hard to read. Perfect for me to step out of Pascal and into C for the afternoon (refresher in C).
PROJECT - To write a console based algorithm where I can convert upper case text to lower case text.
The Method I would like to do is to copy from my text document and paste a string with white spaces in to the input buffer. Then populate the char array with string from the buffer. I would use the STRLEN (Or Similar) to get a char array count, with white spaces. Then use a loop to convert the upper to lower case and write out the final result.
There are 2 points that I had a problem with when I started. Copying and pasting a string to the input buffer and getting STRLEN to see white spaces. "ABC" STRLEN was 3 and "ABC D" was also 3. It was seeing the white space as the string terminator.
Thanks!
-Lars
PROJECT - To write a console based algorithm where I can convert upper case text to lower case text.
The Method I would like to do is to copy from my text document and paste a string with white spaces in to the input buffer. Then populate the char array with string from the buffer. I would use the STRLEN (Or Similar) to get a char array count, with white spaces. Then use a loop to convert the upper to lower case and write out the final result.
There are 2 points that I had a problem with when I started. Copying and pasting a string to the input buffer and getting STRLEN to see white spaces. "ABC" STRLEN was 3 and "ABC D" was also 3. It was seeing the white space as the string terminator.
Thanks!
-Lars