MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / buildStrippedFilename

Method buildStrippedFilename

src/thundersvm/util/log.cpp:753–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751 }
752
753 void File::buildStrippedFilename(const char* filename, char buff[], std::size_t limit) {
754 std::size_t sizeOfFilename = strlen(filename);
755 if (sizeOfFilename >= limit) {
756 filename += (sizeOfFilename - limit);
757 if (filename[0] != '.' && filename[1] != '.') { // prepend if not already
758 filename += 3; // 3 = '..'
759 STRCAT(buff, "..", limit);
760 }
761 }
762 STRCAT(buff, filename, limit);
763 }
764
765 void File::buildBaseFilename(const std::string& fullPath, char buff[], std::size_t limit, const char* separator) {
766 const char *filename = fullPath.c_str();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected