| 781 | } |
| 782 | |
| 783 | std::string CcToUnderline(const std::string& in) { |
| 784 | std::string res; |
| 785 | res.reserve(in.size() * 2); |
| 786 | for (size_t ii = 0; ii < in.size(); ii++) { |
| 787 | if (isupper(in[ii])) { |
| 788 | if (ii > 0) { |
| 789 | res.push_back('_'); |
| 790 | } |
| 791 | res.push_back(tolower(in[ii])); |
| 792 | } else { |
| 793 | res.push_back(in[ii]); |
| 794 | } |
| 795 | } |
| 796 | return res; |
| 797 | } |
| 798 | |
| 799 | /// returns the occurency count of 'toCount' in 'in' |
| 800 | size_t StringCountChar(const std::string& in, const char toCount) { |
nothing calls this directly
no outgoing calls
no test coverage detected