public boolean startsWith(String string){
  if (string == null)   return false;
  int strlen=string.length();
  if (_length < strlen)   return false;
  char[] buffer=_buffer;
  int offset=_offset;
  while (--strlen >= 0) {
    if (buffer[offset + strlen] != string.charAt(strlen))     return false;
  }
  return true;
}

public boolean startsWith ( String string ) { if ( string == null ) return false ; int strlen = string . length ( ) ; if ( _length < strlen ) return false ; char [ ] buffer = _buffer ; int offset = _offset ; while ( -- strlen >= 0 ) { if ( buffer [ offset + strlen ] != string . charAt ( strlen ) ) return false ; } return true ; }
returns true if the charsegment starts with the string .
