bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47712: 27.1; Provide `string-display-width` function, which takes pr


From: Eli Zaretskii
Subject: bug#47712: 27.1; Provide `string-display-width` function, which takes properties into account, `substring-width`
Date: Mon, 12 Apr 2021 20:09:08 +0300

> Cc: 47712@debbugs.gnu.org
> From: Daniel Mendler <mail@daniel-mendler.de>
> Date: Mon, 12 Apr 2021 16:36:05 +0200
> 
> One may still discuss the implementation of a 
> `substring-width` API which generalizes `string-width`.
> 
> (defun string-width (s)
>    (substring-width s 0 (length s)))
> 
> (defun substring-width (s a b)
>    (string-width (substring s a b)))

Why not simply extend string-width to accept 2 optional arguments?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]