diff options
author | dom96 <dominikpicheta@googlemail.com> | 2011-04-24 14:13:52 +0100 |
---|---|---|
committer | dom96 <dominikpicheta@googlemail.com> | 2011-04-24 14:13:52 +0100 |
commit | 3dd67d20fcef755d6b6d2f284b67bbaa8bc45bd9 (patch) | |
tree | c31119748a9ac2e1a408b515919e717ccea51856 /lib/pure/strtabs.nim | |
parent | 71a3f9d7e928ede5ceef170b53d7edba6f6efd8c (diff) | |
parent | fd0d3bf086acb24eac3b5c1752351e7990c9fd2e (diff) | |
download | Nim-3dd67d20fcef755d6b6d2f284b67bbaa8bc45bd9.tar.gz |
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'lib/pure/strtabs.nim')
-rwxr-xr-x | lib/pure/strtabs.nim | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/pure/strtabs.nim b/lib/pure/strtabs.nim index fda0740d3..8be66dee9 100755 --- a/lib/pure/strtabs.nim +++ b/lib/pure/strtabs.nim @@ -142,18 +142,19 @@ proc newStringTable*(mode: TStringTableMode): PStringTable {. result.counter = 0 newSeq(result.data, startSize) -proc newStringTable*(keyValuePairs: openarray[string], - mode: TStringTableMode = modeCaseSensitive): PStringTable {. - rtl, extern: "nst$1WithPairs".} = - ## creates a new string table with given key value pairs. - ## Example:: - ## var mytab = newStringTable("key1", "val1", "key2", "val2", - ## modeCaseInsensitive) - result = newStringTable(mode) - var i = 0 - while i < high(keyValuePairs): - result[keyValuePairs[i]] = keyValuePairs[i + 1] - inc(i, 2) +when false: + proc newStringTable(keyValuePairs: openarray[string], + mode = modeCaseSensitive): PStringTable {. + rtl, extern: "nst$1WithPairs".} = + ## creates a new string table with given key value pairs. + ## Example:: + ## var mytab = newStringTable("key1", "val1", "key2", "val2", + ## modeCaseInsensitive) + result = newStringTable(mode) + var i = 0 + while i < high(keyValuePairs): + result[keyValuePairs[i]] = keyValuePairs[i + 1] + inc(i, 2) proc newStringTable*(keyValuePairs: openarray[tuple[key, val: string]], mode: TStringTableMode = modeCaseSensitive): PStringTable {. |