🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #163

Re: Strings

#163
From: tony
Date: Sat, 27 Feb 1999 00:00
15 lines
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.
>
>
>
Technical Details
Message-ID: <yrRB2.20809$Lz1.1643@wards>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36cbd3e0.0@news.cgocable.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,98a21e077e0fc8fd
X-Google-Attributes: gid10d4ba,public
From: "tony" <tony@netuk.force9.co.uk>
Subject: Re: Strings
Date: 1999/02/27
Message-ID: <yrRB2.20809$Lz1.1643@wards>
X-Deja-AN: 449251564
References: <36cbd3e0.0@news.cgocable.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: abuse@plus.net.uk
X-Trace: wards 920118110 195.166.144.141 (Sat, 27 Feb 1999 12:21:50 BST)
NNTP-Posting-Date: Sat, 27 Feb 1999 12:21:50 BST
Newsgroups: att.lang.c++