whole_func_string: function clearLine(stream, dir) {
    if (stream === null || stream === undefined)
      return;
  
    if (dir < 0) {
      // to the beginning
      stream.write(kClearToBeginning);
    } else if (dir > 0) {
      // to the end
      stream.write(kClearToEnd);
    } else {
      // entire line
      stream.write(kClearLine);
    }
  }
func_code_string: function clearLine(stream, dir) {
    if (stream === null || stream === undefined)
      return;
  
    if (dir < 0) {
      // to the beginning
      stream.write(kClearToBeginning);
    } else if (dir > 0) {
      // to the end
      stream.write(kClearToEnd);
    } else {
      // entire line
      stream.write(kClearLine);
    }
  }
func_documentation_string: clears the current line the cursor is on:
  -1 for left of the cursor
  +1 for right of the cursor
  0 for the entire line