tolower function in C
From: Ahsan (ali_boyz_at_hotmail.com)
Date: 05/08/04
- Next message: Victor Bazarov: "Re: Class search function"
- Previous message: Rob Williscroft: "Re: static & template"
- Next in thread: Rob Williscroft: "Re: tolower function in C"
- Reply: Rob Williscroft: "Re: tolower function in C"
- Reply: David Harmon: "Re: tolower function in C"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 May 2004 07:15:17 -0700
Hi All,
I am having prolems with converting upper case characters to lower
case in Unix's C. I saw the man pages and "tolower" function does it.
But in my case its not working.
My code is as follows:
============================================================
gets ( input );
sscanf(input, "%s", Cmd);
for( p = 0; p < strlen( Cmd ); p++ )/* Changing all input to lower
characters */
{
printf("hello in loop");
if( isupper( Cmd[p] ) )
{
_tolower( Cmd[p] );
printf("%c", Cmd[p]);
}
}
=============================================================
Anxiously Waiting for reply,
Regards,
- Next message: Victor Bazarov: "Re: Class search function"
- Previous message: Rob Williscroft: "Re: static & template"
- Next in thread: Rob Williscroft: "Re: tolower function in C"
- Reply: Rob Williscroft: "Re: tolower function in C"
- Reply: David Harmon: "Re: tolower function in C"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|