parent
9147194427
commit
38c935a573
|
@ -27,8 +27,9 @@ proc parseField[S, T](input: string, output: var array[S, T]) =
|
|||
|
||||
proc parseField[T](input: string, output: var seq[T]) =
|
||||
let parts = input.split(",")
|
||||
if parts.len < 1:
|
||||
raise newException(ValueError, "Sequence is empty")
|
||||
output = newSeq[T](parts.len)
|
||||
if parts.len > 0:
|
||||
for i in 0 .. parts.len - 1:
|
||||
parseField(parts[i], output[i])
|
||||
|
||||
|
|
Loading…
Reference in New Issue