public boolean isBufferAtString(CharSequence buffer,int offset,CharSequence pattern){
  int patternEnd=offset + pattern.length();
  return getBufferEnd() >= patternEnd && StringUtil.equals(buffer.subSequence(offset,patternEnd),pattern);
}

public boolean isBufferAtString ( CharSequence buffer , int offset , CharSequence pattern ) { int patternEnd = offset + pattern . length ( ) ; return getBufferEnd ( ) >= patternEnd && StringUtil . equals ( buffer . subSequence ( offset , patternEnd ) , pattern ) ; }
checks if buffer at current offset contains specific string
