File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 11%% JOIN join two paths with posix file separator
22
33function p = join(base , other )
4- arguments
5- base (1 ,1 ) string
6- other (1 ,1 ) string
7- end
84
95rno = stdlib .root_name(other );
106rnb = stdlib .root_name(base );
1814
1915 if ~stdlib .strempty(rnb )
2016 if endsWith(rnb , [" /" , filesep ])
21- p = rnb + other ;
17+ p = append( rnb , other ) ;
2218 else
23- p = rnb + " / " + other ;
19+ p = append( rnb , ' / ' , other ) ;
2420 end
2521 else
2622 p = other ;
3026
3127 if ~stdlib .strempty(other )
3228 if endsWith(base , [" /" , filesep ])
33- p = base + other ;
29+ p = append( base , other ) ;
3430 else
35- p = base + " / " + other ;
31+ p = append( base , ' / ' , other ) ;
3632 end
3733 else
3834 p = base ;
Original file line number Diff line number Diff line change 99{" a/b/" , " c" , " a/b/c" }, ...
1010{" /" , " " , " /" }, ...
1111{" " , " /" , " /" }, ...
12- {" a " , " b " , " a/b" }, ...
12+ {' a ' , ' b ' , ' a/b' }, ...
1313{" a/b/../" , " c/d/.." , " a/b/../c/d/.." }, ...
1414{" a/b" , " .." , " a/b/.." }, ...
1515{" a/b" , " c/d" , " a/b/c/d" }, ...
You can’t perform that action at this time.
0 commit comments