Solved

tolower() done manually

Posted on 1999-01-20
3
242 Views
Last Modified: 2010-04-15
I know that ctype.h has a tolower function.

If I wanted to write one manually...how is it done?

Thanks!
0
Comment
Question by:knowlton
3 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 20 total points
Comment Utility
It could be done as follows:

char tolower(char c)
{    if('A'<=c && c<='Z')return(c-'A'+'a');
     return(c);
}

0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
depending on your locale...
0
 
LVL 5

Author Comment

by:knowlton
Comment Utility
Thank you.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now