function str=substring(str,first,varargin)


% This is a workaround for a change to the Java interface.  Remove befor R12!

% Copyright 1992-2000 The MathWorks, Inc.
% $Revision: 1.2 $  $Date: 2000/06/15 04:23:24 $


if isempty(varargin)
  str=str(first+1:end);
else
  str=str(first+1:varargin{1}+1);
end
