Trimming procedures Marc Nieper-Wißkirchen (21 Feb 2019 09:36 UTC)
Re: Trimming procedures Marc Nieper-Wißkirchen (22 Feb 2019 17:59 UTC)

Re: Trimming procedures Marc Nieper-Wißkirchen 22 Feb 2019 17:59 UTC

(4) The trimming procedures have to be somehow aware of ANSI escape
sequences and of Unicode combining characters.

Am Do., 21. Feb. 2019 um 10:36 Uhr schrieb Marc Nieper-Wißkirchen
<xxxxxx@nieper-wisskirchen.de>:
>
> (1) The reference implementation uses the "substring" procedure to
> trim a string that does not fit in the width. However, this is not
> quite correct if the string contains characters for which
> "string-width" is not 1.
>
> A correct implementation would have to apply string-width character by
> character as long as the string is still too wide.
>
> (2) In trimmed/both, trimming has to be evenly distributed between the
> left hand and the right hand side. Do we want to distribute by
> character width or by character count? (Character count is probably
> correct.)
>
> (3) The SRFI specifies for trimmed, trimmed/right and trimmed/both
> that: "As soon as any of the fmts exceeds width, stop formatting and
> truncate the result, returning control to whoever called trimmed."
>
> The reference implementation does not honor that but formats all fmts
> before trimming.

--
Prof. Dr. Marc Nieper-Wißkirchen

Universität Augsburg
Institut für Mathematik
Universitätsstraße 14
86159 Augsburg

Tel: 0821/598-2146
Fax: 0821/598-2090

E-Mail: xxxxxx@math.uni-augsburg.de
Web: www.math.uni-augsburg.de/alg/mitarbeiter/mnieper/