🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #135

Re: String Function

#135
From: jwpurple
Date: Sun, 14 Mar 1999 00:00
14 lines
1260 bytes
count or count_if are STL generic functions that could do that.  There's an
example in Lippman/Lajoie.

Chris Psiuk wrote in message <36ebe918.0@news.cgocable.net>...
>Does anyone know if there is a string function, possibly in String.h,
>that will search through a string and return the number of occurances
>of a certain character.
>    for example in the string "Borland C++"
>    I want the value 2 returned when I want to know how many '+'
>    characters are in the string "Borland C++"
>
>
>
>
Technical Details
Message-ID: <36ec1044.0@news.iglou.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36ebe918.0@news.cgocable.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,f33d01c31aba151a
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: 109fba,f33d01c31aba151a
X-Google-Attributes: gid109fba,public
X-Google-Thread: 114592,f33d01c31aba151a
X-Google-Attributes: gid114592,public
From: "jwpurple" <wake@iglou.com>
Subject: Re: String Function
Date: 1999/03/14
Message-ID: <36ec1044.0@news.iglou.com>
X-Deja-AN: 454947503
X-NNTP-Posting-Host: news-incoming.iglou.com
References: <36ebe918.0@news.cgocable.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Trace: 14 Mar 1999 14:38:44 -0500, lou-ts8-2.iglou.com
Organization: IgLou Internet Services, Inc.
Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++