From: amwaterhouse Date: Wed, 9 Mar 2005 18:35:46 +0000 (+0000) Subject: allows deletion of chars X-Git-Tag: Release_2_0~613 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1fea111206bcb8b84284805a3b6e233d5879084c;p=jalview.git allows deletion of chars --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 691a1f1..99f2de2 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -201,6 +201,13 @@ public class Sequence implements SequenceI sequence = sbuffer.toString(); } + public void deleteChars(int i, int j) + { + StringBuffer sbuffer = new StringBuffer(sequence); + sbuffer.delete(i,j); + sequence = sbuffer.toString(); + } + public void insertCharAt(int i, char c) { insertCharAt(i,c,true); diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 75b17eb..a056a36 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -30,6 +30,7 @@ public interface SequenceI { public int findIndex(int pos); public int findPosition(int i); + public void deleteChars(int i, int j); public void deleteCharAt(int i); public void insertCharAt(int i, char c); public void insertCharAt(int i,char c,boolean chop);