function string2=del_following_spaces(string1);
% del_following_spaces: Deletes spaces at the trailing end of a string.
%
% USAGE: string2=del_leading_spaces(string1)
% 
% DESCRIPTION:
% 
% AUTHOR: John Steger
%         NOAA/AOML/PhOD
% 
% SEE ALSO:
% 
% DEPENDENCIES: None
%
% EXAMPLES:  'abc   ' becomes 'abc'
% 
% REFERENCES:


if isempty(string1), 
   string2=string1;
   return
end

for i=length(string1):-1:1
   if string1(i)==' '
      string1=string1(1:i-1);
   else
       string2=string1;
       return
   end
end
string2=string1;

return
