summary refs log tree commit diff stats
path: root/lib/pure/strutils.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-04 02:56:55 +0200
committerAraq <rumpf_a@web.de>2011-06-04 02:56:55 +0200
commit5008b44467bf545287289087a13f7e53c3d242ff (patch)
tree856090834d05969fc2722c5f3f3bd5df61f449f6 /lib/pure/strutils.nim
parent3260702a6044cdae89cf673ad1983aa3342127de (diff)
downloadNim-5008b44467bf545287289087a13f7e53c3d242ff.tar.gz
bugfixes for semantic checking; thread implementation pushed the compiler
Diffstat (limited to 'lib/pure/strutils.nim')
-rwxr-xr-xlib/pure/strutils.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index 7ed224b67..8659c7d29 100755
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -461,6 +461,12 @@ proc repeatChar*(count: int, c: Char = ' '): string {.noSideEffect,
   ## the character `c`.

   result = newString(count)

   for i in 0..count-1: result[i] = c

+
+proc repeatStr*(count: int, s: string): string {.noSideEffect,

+  rtl, extern: "nsuRepeatStr".} =

+  ## Returns `s` concatenated `count` times.

+  result = newStringOfCap(count*s.len)

+  for i in 0..count-1: result.add(s)

 

 proc align*(s: string, count: int): string {.

   noSideEffect, rtl, extern: "nsuAlignString".} =