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

Function ExeNameToPathWithoutTrailingDelimiter

src/mydefs.cpp:356–359  ·  view source on GitHub ↗

Trim path to part prior last directory separator Sample: c:\temp\a.exe >> c:\temp || /temp/a >> /temp current len of path pointer to path char

Source from the content-addressed store, hash-verified

354/// <param name="path_len">current len of path</param>
355/// <param name="path">pointer to path char</param>
356void ExeNameToPathWithoutTrailingDelimiter(int& path_len, char* path) {
357 while ((path_len > 0) && (path[path_len] != DIRECTORY_SLASH) && (path[path_len] != ':')) path_len--;
358 path[path_len] = 0;
359}
360
361/// get the path of the exe file (incl. trailing path delimiter)
362std::string exe_path() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected