% License Creative Commons 0 (like the public domain)
% Use, study, modify and share!
% Even if your are not forced with copyleft, do not forget to respect freedom of others.
% For more informations : https://www.gnu.org/philosophy/free-sw.html
% If you modify it and use it with MATLAB (that is proprietary), please check compatibility with GNU Octave (that is free/libre software that has only few differences).
% This file is provided with no warranty.
% Names of contributors must not be used to endorse or promote products derived from this software without specific prior written permission.
% @author Nicola Spanti (RyDroid)


% cstrcat return a string containing all the arguments concatenated horizontally with trailing white space preserved.
% The aim of this function is to implement cstrcat like it is in GNU Octave.
% https://www.gnu.org/software/octave/doc/interpreter/Concatenating-Strings.html#index-cstrcat
% http://hg.savannah.gnu.org/hgweb/octave/file/tip/scripts/strings/cstrcat.m
function concatenated_string = cstrcat (varargin)
	if nargin < 1
		error('cstrcat: at least one argument is needed')
	elseif ~ iscellstr (varargin)
		error('cstrcat: arguments must be strings')
	end
	concatenated_string = [varargin{:}];
end
