code: public char setIndex(int pos) 
    { 
      if (pos < 0) {
        _pos = 0;
        return DONE;
      }
      else if (_length <= pos) {
        _pos = _length;
        return DONE;
      }
      else {
        _pos = pos; 
        return _string.charAt(pos);
      }
    }
docs: sets the cursor to the position