Commit Friday evening.

PDFA and EXFO Laser are now part of the family
This commit is contained in:
Silas Labor Zizou
2024-10-25 20:31:50 +02:00
parent bafc7f12b7
commit 99fe2ca106
208 changed files with 28244 additions and 460 deletions

View File

@@ -0,0 +1,24 @@
function [ newstr ] = m2tstrjoin( cellstr, delimiter )
%M2TSTRJOIN This function joins a cellstr with a separator
%
% This is an alternative implementation for MATLAB's `strjoin`, since that
% one is not available before R2013a.
%
% See also: strjoin
%TODO: Unify the private `m2tstrjoin` functions
%FIXME: differs from src/private/m2tstrjoin in functionality !!!
nElem = numel(cellstr);
if nElem == 0
newstr = '';
return % m2tstrjoin({}, ...) -> ''
end
newstr = cell(2,nElem);
newstr(1,:) = reshape(cellstr, 1, nElem);
newstr(2,1:nElem-1) = {delimiter}; % put delimiters in-between the elements
newstr(2, end) = {''}; % for Octave 4 compatibility
newstr = [newstr{:}];
end