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

Function CcToUnderline

LASzip/src/mydefs.cpp:779–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779std::string CcToUnderline(const std::string& in) {
780 std::string res;
781 res.reserve(in.size() * 2);
782 for (size_t ii = 0; ii < in.size(); ii++) {
783 if (isupper(in[ii])) {
784 if (ii > 0) {
785 res.push_back('_');
786 }
787 res.push_back(tolower(in[ii]));
788 } else {
789 res.push_back(in[ii]);
790 }
791 }
792 return res;
793}
794
795/// returns the occurency count of 'toCount' in 'in'
796size_t StringCountChar(const std::string& in, const char toCount) {

Callers 1

runMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected