Calculate the number of characters in the string in c

How to count the number of “_” in a string like “bla_bla_blabla_bla”?
#include 

std::string s = "a_b_c ";
size_t n = std::count(s.begin(), s.end(),'_');

How to calculate like ” The number of “_” in a string like bla_bla_blabla_bla”?

#include 

std::string s = "a_b_c";
size_t n = std:: count(s.begin(), s.end(),'_');

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3024 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.