X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2Fwrap%2FCharArrayWrap.java;h=5fa0fb0f79e9955a3a2f7f3ae823c2c555ea8620;hb=2bb31b63e0da18f05ac45fa105cf724b3927bc60;hp=e490cc9da64d9633cca70d26a3e2002da8188c5f;hpb=c40cf903f740a72ab63dd1abc10fa33450ce660d;p=jalview.git diff --git a/src/com/stevesoft/pat/wrap/CharArrayWrap.java b/src/com/stevesoft/pat/wrap/CharArrayWrap.java index e490cc9..5fa0fb0 100755 --- a/src/com/stevesoft/pat/wrap/CharArrayWrap.java +++ b/src/com/stevesoft/pat/wrap/CharArrayWrap.java @@ -1,39 +1,76 @@ -// -// This software is now distributed according to -// the Lesser Gnu Public License. Please see -// http://www.gnu.org/copyleft/lesser.txt for -// the details. -// -- Happy Computing! -// -package com.stevesoft.pat.wrap; - -import com.stevesoft.pat.*; - -/** This provides a wrapper for a char array so that - it can be searched by Regex. */ -public class CharArrayWrap implements StringLike { - char[] ca; - public char[] getCharArray() { return ca; } - public CharArrayWrap(char[] ca) { this.ca = ca; } - public String toString() { - return new String(ca); - } - public char charAt(int i) { return ca[i]; } - public int length() { return ca.length; } - public String substring(int i1,int i2) { - StringBuffer sb = new StringBuffer(); - for(int i=i1;i