Is this a reasonable C++ wrapper function for Python's list.count([character]) method?int count( char CHAR, string STR ) {    int counter = 0;    for ( int i = 0 ; i < STR.size() - 1 ; i++  ) {        if ( STR[i] == CHAR ) {            counter++;        }    }    return counter;}//Edited for( int i = 0 ; i++ < STR.size-1 ;  ) to for(int i = 0 ; i < STR.size ; i++) now it counts the first char of the string =DTested it...works exactly like the python <3
C++ wrapper function for Python's list.count([character]) method?
c++;python