Vectors.printStringVectorInHtml(s, name, fileName, printIndices);
Print vector of strings s called name into
a file fileName in HTML format.
Optionally, row indices are printed as well.
s = {"w", "3", "alpha"};
printStringVectorInHtml(s, "myVec", "log.html", true);
saves following HTML code in the file log.html:
<table border="0">
<tr>
<td valign="middle"> myVec</td>
<td valign="middle">=</td>
<td>
<table style="background-color:rgb(100, 100, 100);" cellpadding="3" border="0" cellspacing="1">
<tr style="background-color:white">
<td align="right" style="background-color:rgb(230, 230, 230);">1</td>
<td align="left">w</td>
</tr>
<tr style="background-color:white">
<td align="right" style="background-color:rgb(230, 230, 230);">2</td>
<td align="left">3</td>
</tr>
<tr style="background-color:white">
<td align="right" style="background-color:rgb(230, 230, 230);">3</td>
<td align="left">alpha</td>
</tr>
</table>
</td>
</tr>
</table>
function printStringVectorInHtml extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; input String s[:] "String vector"; input String name = "" "Vector name used for printing"; input String fileName = "log.html"; input Boolean printIndices = true "=true, if row indices shall be printed, otherwise they are not printed"; end printStringVectorInHtml;