1) Added methods for conditional breakpoints and skip/hit count.
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / parser / StringPointer.java
1 package net.sourceforge.phpdt.sql.parser;
2
3 public class StringPointer {
4         char[] value;
5         int offset = 0;
6         int mark = 0;
7         public StringPointer(String s) {
8                 value = s.toCharArray();
9         }
10         public char getNext() {
11                 char retVal = value[offset];
12                 offset++;
13                 return retVal;
14         }
15         public void mark() {
16                 mark = offset;
17         }
18         public void reset() {
19                 offset = mark;
20         }
21         public int getOffset() {
22                 return offset;
23         }
24         public boolean isDone() {
25                 return offset == value.length;
26         }
27         public int getLength() {
28                 return value.length;
29         }
30 }