Couting occourance of specified characters

1 Mar
2008
1 Mar
'08
8:02 p.m.
Hi, the snipped attached counts the accourance of a specified character. Is there a simpler way using the boost libs? This solution looks quite overkill. It should be fast ;-) Thanks, Olaf

1 Mar
1 Mar
8:20 p.m.
AMDG Olaf Peter wrote:
Hi,
the snipped attached counts the accourance of a specified character. Is there a simpler way using the boost libs? This solution looks quite overkill. It should be fast ;-)
If you only want one character the standard library is enough: std::count(str1.begin(), str1.end(), ' ') In Christ, Steven Watanabe
6202
Age (days ago)
6202
Last active (days ago)
1 comments
2 participants
participants (2)
-
Olaf Peter
-
Steven Watanabe