> On Nov 11, 2019, at 9:30 AM, Jose Isaias Cabrera <jic...@outlook.com> wrote: > > Say that I am writing a report and I only want to print the first 20 > characters of a string, that would be something like,
Hang on — why exactly 20 characters? Of text in an arbitrary language, which is to be displayed in an arbitrary font, with an arbitrary line width? I don't know about you, but the only time I think about "exactly 20 characters" is when I'm writing to a terminal window. Most of the time that's ASCII, and even if it isn't, Asian characters are going to be double-width, and emojis might render an arbitrary number of code points to a single-width graphic. So "20 characters" still doesn't map to a fixed width onscreen. If I'm writing a report, I more likely want to render only the first _line_ of a string, i.e. enough text to fill some number of points/millimeters/pixels of space, possibly minus an ellipsis. That is a job for a text rendering library, not `writeflen`. —Jens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users