public final CharSequence head(CharSequence csq){
  return csq.subSequence(0,index);
}

public final CharSequence head ( CharSequence csq ) { return csq . subSequence ( 0 , index ) ; }
returns the head of the specified character sequence until this cursor position .
