예제 #1
0
 public String getSuffixString() {
   StringBuilder sb = new StringBuilder();
   for (int i = offset; i <= string.length(); i++) {
     sb.append(string.getChar(i));
   }
   return sb.toString();
 }
예제 #2
0
    public int countMatches(char[] array, int startMatch, int endMatch) {
      int ei = start;
      int mi = startMatch;
      int eend = end();

      for (; ei < eend && mi < endMatch; ei++, mi++) {
        assert mi >= 0;
        assert mi < array.length;

        if (array[mi] != string.getChar(ei)) {
          return ei - start;
        }
      }
      return ei - start;
    }
예제 #3
0
 public char getChar(int i) {
   return array != null ? array[i] : string.getChar(i);
 }
예제 #4
0
 public char getChar(int offset) {
   return string.getChar(start + offset);
 }