Wednesday 22 November 2017

c++ - How can I count the number of occurrences of a user inputed element in a string?

How can I count the number of occurrences of a user
inputed element in a
string?
Example:



Input:
adseddsdf
Input:
a
Output:
1

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...