From 969cca251b19a386d21e14f252526f9d559976eb Mon Sep 17 00:00:00 2001 From: Mauco03 <marco.gaibotti@skywarder.eu> Date: Fri, 10 May 2024 20:16:25 +0200 Subject: [PATCH] [refactoring-ode][trimPath] Added brief description --- functions/miscellaneous/trimPath.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functions/miscellaneous/trimPath.m b/functions/miscellaneous/trimPath.m index eded8f8..192009c 100644 --- a/functions/miscellaneous/trimPath.m +++ b/functions/miscellaneous/trimPath.m @@ -1,4 +1,13 @@ function out = trimPath(path) +% trimPath - This function recursively contracts paths that use ".." +% e.g: C:\User\..\randomFolder -> C:\randomFolder +% +% INPUTS: +% - path, string, path to be trimmed +% +% OUTPUTS: +% - trimmed path, string + trimmed = false; out = fullfile(path); % Trims multiple separators characters exp = ['\', filesep, '[^\', filesep,']+\', filesep,'\.\.']; -- GitLab