|
Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
|
Code from the chapter "A C++ Primer". More...
Functions | |
| int | count (std::string s, char target) |
| Returns the number of occurrences of target character in string s. | |
| int | count (const char *s, int n, char target) |
| Returns the number of occurrences of target character in the n-character array s. | |
| void | remove_all (std::string &s, char target) |
| Removes all occurrences of target character from string s. | |
Code from the chapter "A C++ Primer".
Returns the number of occurrences of target character in the n-character array s.
| int dsac::primer::count | ( | string | s, |
| char | target | ||
| ) |
Returns the number of occurrences of target character in string s.
| void dsac::primer::remove_all | ( | string & | s, |
| char | target | ||
| ) |
Removes all occurrences of target character from string s.