summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-03-04 16:42:13 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-03-04 16:42:13 +0100
commit1ca2db0273938930f71fb0e85569a1df55b195fb (patch)
treec89040a351ec52641a1f36d02bf95860442a8489 /tools
parent32126aaad6db85159bdaa1e71e50a23622fe1452 (diff)
parentb902ea887b7717f658661ae5887602e6e2b61a3a (diff)
downloadNim-1ca2db0273938930f71fb0e85569a1df55b195fb.tar.gz
Merge pull request #2260 from oderwat/upd-deprecated-repeats
Updates to remove deprecated repeatStr() and repeatChar() from all files.
Diffstat (limited to 'tools')
-rw-r--r--tools/nimgrep.nim2
-rw-r--r--tools/nimweb.nim4
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/nimgrep.nim b/tools/nimgrep.nim
index aeae86300..72e4adc07 100644
--- a/tools/nimgrep.nim
+++ b/tools/nimgrep.nim
@@ -109,7 +109,7 @@ proc highlight(s, match, repl: string, t: tuple[first, last: int],
   for i in t.last+1 .. y: stdout.write(s[i])
   stdout.write("\n")
   if showRepl:
-    stdout.write(repeatChar(alignment-1), "-> ")
+    stdout.write(spaces(alignment-1), "-> ")
     for i in x .. t.first-1: stdout.write(s[i])
     writeColored(repl)
     for i in t.last+1 .. y: stdout.write(s[i])
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index 8213cf418..a7301195e 100644
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -99,8 +99,8 @@ macro updated(e: expr): expr {.immediate.} =
 proc updatedDate(year, month, day: string): string =
   ## wrapper around the update macro with easy input.
   result = updated("$1-$2-$3T00:00:00Z" % [year,
-    repeatStr(2 - len(month), "0") & month,
-    repeatStr(2 - len(day), "0") & day])
+    repeat("0", 2 - len(month)) & month,
+    repeat("0", 2 - len(day)) & day])
 
 macro entry(e: expr): expr {.immediate.} =
   ## generates the rss xml ``entry`` element.