Thread View: att.lang.c++
2 messages
2 total messages
Started by Chris Psiuk
Thu, 18 Feb 1999 00:00
Strings
Author: Chris Psiuk
Date: Thu, 18 Feb 1999 00:00
Date: Thu, 18 Feb 1999 00:00
1 lines
483 bytes
483 bytes
How can I count the number of uppercase letters in a string.
Re: Strings
Author: tony
Date: Sat, 27 Feb 1999 00:00
Date: Sat, 27 Feb 1999 00:00
15 lines
922 bytes
922 bytes
Use the function isupper() found in the ctype.h file
e.g.
int count=0;
for(int i=0; i<strlen(yourstring)+1;i++)
{
if (isupper(yourstring[i]))
count++;
}
cout << count;
Chris Psiuk wrote in message <36cbd3e0.0@news.cgocable.net>...
>How can I count the number of uppercase letters in a string.
>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads