rl.clearLine(dir)
-
dir
<integer>-
-1
:从光标向左¥
-1
: to the left from cursor -
1
:从光标向右¥
1
: to the right from cursor -
0
:整行¥
0
: the entire line
-
-
返回:自身
¥Returns: this
rl.clearLine()
方法在待处理动作的内部列表中添加一个动作,该动作在 dir
标识的指定方向上清除关联 stream
的当前行。调用 rl.commit()
看看这个方法的效果,除非 autoCommit: true
传给了构造函数。
¥The rl.clearLine()
method adds to the internal list of pending action an
action that clears current line of the associated stream
in a specified
direction identified by dir
.
Call rl.commit()
to see the effect of this method, unless autoCommit: true
was passed to the constructor.