summary refs log tree commit diff stats
path: root/lib/pure/strutils.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-02-20 20:12:22 +0100
committerAraq <rumpf_a@web.de>2011-02-20 20:12:22 +0100
commit2cdfe35e737291e65060e2f954d718316a969048 (patch)
treea39553bd397311c4601dde11be37c50ad99d81ab /lib/pure/strutils.nim
parentcbee9c4e1a1252e6c809d25a0ef371ddee3fc802 (diff)
downloadNim-2cdfe35e737291e65060e2f954d718316a969048.tar.gz
tests themselves contain the expected result
Diffstat (limited to 'lib/pure/strutils.nim')
-rwxr-xr-xlib/pure/strutils.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index d7b457263..8d5966670 100755
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -139,7 +139,7 @@ proc findNormalized(x: string, inArray: openarray[string]): int =
   var i = 0

   while i < high(inArray):

     if cmpIgnoreStyle(x, inArray[i]) == 0: return i

-    inc(i, 2) # incrementing by 1 would probably result in a

+    inc(i, 2) # incrementing by 1 would probably lead to a

               # security hole...

   return -1

 

@@ -166,7 +166,6 @@ proc addf*(s: var string, formatstr: string, a: openarray[string]) {.
         while formatstr[i] in Digits:

           j = j * 10 + ord(formatstr[i]) - ord('0')

           inc(i)

-        num = j

         add s, a[j - 1]

       of '{':

         var j = i+1

@@ -1003,5 +1002,6 @@ when isMainModule:
                    it goes""", 10, false)

   assert formatBiggestFloat(0.00000000001, ffDecimal, 11) == "0.00000000001"

   assert formatBiggestFloat(0.00000000001, ffScientific, 1) == "1.0e-11"

-  

+  
+  assert "$# $3 $# $#" % ["a", "b", "c"] == "a c b c"