diff options
Diffstat (limited to 'doc/lispref/strings.texi')
-rw-r--r-- | doc/lispref/strings.texi | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index a9e1105c824..0914f204113 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -248,24 +248,6 @@ equivalent to 0. Thus, @w{@code{(substring-no-properties properties removed. @end defun -@defun string-glyph-split string -Special care has to be taken when handling strings that are meant to -be displayed. @code{substring} and friends work on individual -characters (i.e., code points), but things like emojis are often -represented by @dfn{grapheme clusters}, which are basically a bunch of -code points ``glued together'' in various ways. This function splits -up strings like that into a list of strings, where each of these -resulting strings represents a glyph that should be displayed as a -unit. - -For instance, if you want to display a string without the first glyph, -you can say: - -@example -(apply #'insert (cdr (string-glyph-split string)))) -@end example -@end defun - @defun concat &rest sequences @cindex copying strings @cindex concatenating strings @@ -448,8 +430,8 @@ middle of a character representation. This function measures the string length in characters or bytes, and thus is generally inappropriate if you need to shorten strings for display purposes; use @code{truncate-string-to-width} or -@code{window-text-pixel-size} instead (@pxref{Size of Displayed -Text}). +@code{window-text-pixel-size} or @code{string-glyph-split} instead +(@pxref{Size of Displayed Text}). @end defun @defun string-lines string &optional omit-nulls |