CSV to HTML translation: Difference between revisions
Content added Content deleted
(CSV to HTML translation en FreeBasic) |
(Updated to work with Nim 1.4: added missing types in parameters.) |
||
Line 3,635: | Line 3,635: | ||
The multitude,Behold his mother! Behold his mother!""" |
The multitude,Behold his mother! Behold his mother!""" |
||
proc row2tr(row): string = |
proc row2tr(row: string): string = |
||
result = "<tr>" |
result = "<tr>" |
||
let cols = xmlEncode(row).split(",") |
let cols = xmlEncode(row).split(",") |
||
Line 3,642: | Line 3,642: | ||
result.add "</tr>" |
result.add "</tr>" |
||
proc csv2html(txt): string = |
proc csv2html(txt: string): string = |
||
result = "<table summary=\"csv2html program output\">\n" |
result = "<table summary=\"csv2html program output\">\n" |
||
for row in txt.splitLines(): |
for row in txt.splitLines(): |