package jalview.datamodel;
import jalview.analysis.AlignSeq;
+import jalview.util.StringUtils;
import java.util.ArrayList;
import java.util.Enumeration;
{
return;
}
- // TODO use StringUtils.deleteChars
- char[] tmp;
-
- if (j >= sequence.length)
- {
- tmp = new char[i];
- System.arraycopy(sequence, 0, tmp, 0, i);
- j = sequence.length;
- }
- else
- {
- tmp = new char[sequence.length - j + i];
- System.arraycopy(sequence, 0, tmp, 0, i);
- System.arraycopy(sequence, j, tmp, i, sequence.length - j);
- }
+ char[] tmp = StringUtils.deleteChars(sequence, i, j);
boolean createNewDs = false;
// TODO: take a look at the new dataset creation validation method below -
// this could become time comsuming for large sequences - consider making it