code: function(lineIndex, includeDelimiter) {
  			var lineCount = this.getLineCount();
  			if (!(0 <= lineIndex && lineIndex < lineCount)) {
  				return -1;
  			}
  			if (lineIndex + 1 < lineCount) {
  				var end = this._lineOffsets[lineIndex + 1];
  				if (includeDelimiter) {
  					return end;
  				}
  				var text = this.getText(Math.max(this._lineOffsets[lineIndex], end - 2), end);
  				var i = text.length, c;
  				while (((c = text.charCodeAt(i - 1)) === 10) || (c === 13)) {
  					i--;
  				}
  				return end - (text.length - i);
  			} else {
  				return this.getCharCount();
  			}
  		}
docs: Returns the end character offset for the given line.
  <p>
  The end offset is not inclusive. This means that when the line delimiter is included, the
  offset is either the start offset of the next line or char count. When the line delimiter is
  not included, the offset is the offset of the line delimiter.
  </p>
  <p>
  The valid indices are 0 to line count exclusive.  Returns <code>-1</code>
  if the index is out of range.
  </p>
  
  @param {Number} lineIndex the zero based index of the line.
  @param {Boolean} [includeDelimiter=false] whether or not to include the line delimiter.
  @return {Number} the line end offset or <code>-1</code> if out of range.
  
  @see orion.editor.TextModel#getLineStart