function s2=s_put(s1,s2,n);
%	Put s1 into s2 at position n.
%
%	[s2]=s_put(s1,s2,n);

%	Latest revision by P. Dragos 7-Jun-91.
%
%	P. Dragos, Battelle Ocean Sciences
%	Duxbury, MA 02332
%	(617) 934-0571
%
%	Copyright (c) 1991 by Paul Dragos.
%	This program is copyrighted.  However, you are encouraged to
%	copy and share it, so long as no charge is imposed.

s1=s_trim(s1);
ln=length(s1);
if length(s2) < n+ln-1, s2=s_pad(s2,n+ln-1); end;
s2(n:n+ln-1)=s1(1:ln);
return;
