osmq.util
Class StringParser
java.lang.Object
osmq.util.StringParser
- public class StringParser
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringParser
public StringParser(java.lang.String string)
getPosition
public final int getPosition()
validString
public boolean validString()
getOccurance
public int getOccurance()
findSubstring
public final boolean findSubstring(java.lang.String sub)
ignoreSubstring
public final boolean ignoreSubstring(java.lang.String sub)
findTokenOccurance
public final boolean findTokenOccurance(java.lang.String token,
int occurance)
- Locates an occurance of a character within a string that matches
a character in another string, and returns its offset.
The occurances are numbered 1-n.
If the occurance is not found, returns -1.
If found, returns the zero-relative offset position of the character.
resetPosition
public void resetPosition()
findTokenOccurance
public final boolean findTokenOccurance(char token,
int occurance)
- Locates an occurance of a character within a string and
returns its offset. The occurances are numbered 1-n.
If the occurance is not found, returns -1.
If found, returns the zero-relative offset position of the character.