mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Add new function 'string-pixel-width'
* doc/lispref/display.texi (Size of Displayed Text): Mention it. * lisp/emacs-lisp/shortdoc.el (string): Mention it. * lisp/emacs-lisp/subr-x.el (string-pixel-width): New function.
This commit is contained in:
parent
3fac3120f8
commit
03366de394
5 changed files with 40 additions and 3 deletions
|
|
@ -242,7 +242,14 @@ There can be any number of :example/:result elements."
|
|||
:eval (number-to-string 42))
|
||||
"Data About Strings"
|
||||
(length
|
||||
:eval (length "foo"))
|
||||
:eval (length "foo")
|
||||
:eval (length "avocado: 🥑"))
|
||||
(string-width
|
||||
:eval (string-width "foo")
|
||||
:eval (string-width "avocado: 🥑"))
|
||||
(string-pixel-width
|
||||
:eval (string-pixel-width "foo")
|
||||
:eval (string-pixel-width "avocado: 🥑"))
|
||||
(string-search
|
||||
:eval (string-search "bar" "foobarzot"))
|
||||
(assoc-string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue