Closed flibustenet closed 5 years ago
Unfortunately, the various commit messages for SplitLines()
evidently were not carried over from the old Google Code repository, where the function was introduced, to Github. I seem to remember that Bruno Michel, the author of the function, needed to know in advance the number of lines needed when constrained by a given width. Then Lawrence Kesteloot corrected a subtle problem caused by using ints for measuring; the change to floats probably introduced the difference that you see.
It seems like SplitLines()
should be used when you require precise placement and are prepared to manually position lines. The line breaks won't necessarily correspond to the ones made by MultiCell()
.
Hi,
I use SplitLines to know the max height of cells in rows of a table.
For one string I don't find the same result with SplitLines and Multicell. SplitLines say 1 line, MultiCell write 2 lines. I've looked quickly in the code of MultiCell, it seems that it doesn't use exactly the same code, something about int/float64 ?