MCPcopy Create free account
hub / github.com/LASzip/LASzip / CcToUnderline

Function CcToUnderline

src/mydefs.cpp:783–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783std::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'
800size_t StringCountChar(const std::string& in, const char toCount) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected