вс, 26 дек. 2021 г. в 13:51, Eli Zaretskii : > > From: Evgeny Zajcev > > Date: Sun, 26 Dec 2021 13:41:21 +0300 > > Cc: emacs-devel > > > > > And also it will be possible to write something like > `string-glyph-length' to return 1 for "👨‍👩‍👧‍👦" > > instead of 7 > > > as `length' returns now. > > > > Why would that be useful? > > > > Sometimes it is useful to know real string length before acting on > > it. > > If you mean their width on display, then we have string-width for > that. And if you need absolute accuracy, use window-text-pixel-size. > > > In my case, I use a service that has > > limitation on number chars it can act on and emojis are counted as > > single char. > > But that is incorrect: most Emoji sequences occupy two columns on display. > No, no, not string-width, string length in number of glyphs, as Swift counts them: "👨‍👩‍👧‍👦".length == 1 -- lg