case consistency part 6
This commit is contained in:
parent
9c3751a37c
commit
bf205fa85d
7 changed files with 169 additions and 169 deletions
|
|
@ -56,7 +56,7 @@ var
|
|||
|
||||
proc ask(msg: string): string =
|
||||
stdout.write(msg)
|
||||
result = stdin.readline()
|
||||
result = stdin.readLine()
|
||||
|
||||
proc Confirm: TConfirmEnum =
|
||||
while true:
|
||||
|
|
@ -66,7 +66,7 @@ proc Confirm: TConfirmEnum =
|
|||
of "l", "all": return ceAll
|
||||
of "n", "no": return ceNo
|
||||
of "e", "none": return ceNone
|
||||
else: nil
|
||||
else: discard
|
||||
|
||||
proc countLines(s: string, first, last: int): int =
|
||||
var i = first
|
||||
|
|
@ -308,7 +308,7 @@ checkOptions({optIgnoreCase, optIgnoreStyle}, "ignore_case", "ignore_style")
|
|||
|
||||
if optStdin in options:
|
||||
pattern = ask("pattern [ENTER to exit]: ")
|
||||
if IsNil(pattern) or pattern.len == 0: quit(0)
|
||||
if isNil(pattern) or pattern.len == 0: quit(0)
|
||||
if optReplace in options:
|
||||
replacement = ask("replacement [supports $1, $# notations]: ")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue