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

Function ExeNameToPathWithoutTrailingDelimiter

LASzip/src/mydefs.cpp:352–355  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected