ci_environment/src/env_lib.cxx
// Remove trailing separator from dir if possible.
Remove trailing separator from dir if possible.
Remove trailing separator from dir if possible .
string unsep(string dir) {
    string::size_type len = dir.length();
    string::size_type last = len - 1;
    if (len == 0 || !(dir[last] == path_sep || dir[last] == '/')) {
    }
    else if (len == 1) {
    }
#ifdef _WIN32
    else if (len == 3 && dir[1] == ':') {
    }
#endif
    else {
	dir.erase(last, 1);
    }
string unsep ( string dir ) { string :: size_type len = dir . length ( ) ; string :: size_type last = len - 1 ; if ( len == 0 || ! ( dir [ last ] == path_sep || dir [ last ] == ' ' ) ) { } else if ( len == 1 ) { } #ifdef _WIN32 else if ( len == 3 && dir [ 1 ] == ' ' ) { } #endif else { dir . erase ( last , 1 ) ; }
Remove trailing separator from dir if possible.
Remove trailing separator from dir if possible .
// dir is OK. // dir is OK, 1-char path_sep. // dir is OK, "C:\"