[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

tolower() done manually

I know that ctype.h has a tolower function.

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

Thanks!
0
Tom Knowlton
Asked:
Tom Knowlton
1 Solution
 
imladrisCommented:
It could be done as follows:

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

0
 
ozoCommented:
depending on your locale...
0
 
Tom KnowltonWeb developerAuthor Commented:
Thank you.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now