[Top][All Lists]

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

master b7a495f: doc/lispref/text.texi (Substitution): Add subst-char-in-

From: Lars Ingebrigtsen
Subject: master b7a495f: doc/lispref/text.texi (Substitution): Add subst-char-in-string
Date: Sat, 10 Jul 2021 13:00:21 -0400 (EDT)

branch: master
commit b7a495f8d032e7c60f490a4a822f854707f02275
Author: Filipp Gunbin <fgunbin@fastmail.fm>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    doc/lispref/text.texi (Substitution): Add subst-char-in-string
    * doc/lispref/text.texi (Substitution): Document
    subst-char-in-string (bug#49420).
 doc/lispref/text.texi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 0c87a19..71a8efe 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4428,6 +4428,16 @@ ThXs Xs the contents of the buffer before.
 @end example
 @end defun
+@defun subst-char-in-string fromchar tochar string &optional inplace
+@cindex replace characters in string
+This function replaces all occurences of the character @var{fromchar}
+with @var{tochar} in @var{string}.  Unless @var{inplace} is non-nil,
+substitution occurs in a copy of @var{string}.  In any case, the
+function returns the resulting string.  Both characters must have the
+same multi-byte length.
+@end defun
 @deffn Command translate-region start end table
 This function applies a translation table to the characters in the
 buffer between positions @var{start} and @var{end}.

reply via email to

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