olindgre 2ece01e1d7 Make powertrain-build not overlap with pybuild in site-packages
Change-Id: I7b59f3f04f0f787d35db0b9389f295bf1ad24f56
2024-09-17 10:25:04 +02:00

17 lines
486 B
Matlab

% Copyright 2024 Volvo Car Corporation
% Licensed under Apache 2.0.
function result = Strip_Suffix(fileName)
% Some file names have a version suffix, remove that first
underscoreIndex = strfind(fileName, '__');
if isempty(underscoreIndex)
result = fileName;
else
if strcmp(version('-release'),'2011b')
result = fileName(1:underscoreIndex-1);
else
result = extractBefore(fileName,underscoreIndex);
end
end
end