function index = startsWith(s, prefix)

  n = length(prefix);
%
%  Empty prefix.
%
  if ( n == 0 )
    retval = 1;
  else
    retval = strncmp(s, prefix, n);
  end

  index = find ( retval );

  return
end

