From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/elisp/modifying-strings.html | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 devdocs/elisp/modifying-strings.html (limited to 'devdocs/elisp/modifying-strings.html') diff --git a/devdocs/elisp/modifying-strings.html b/devdocs/elisp/modifying-strings.html deleted file mode 100644 index 4ea7ee3e..00000000 --- a/devdocs/elisp/modifying-strings.html +++ /dev/null @@ -1,12 +0,0 @@ -

Modifying Strings

You can alter the contents of a mutable string via operations described in this section. See Mutability.

The most basic way to alter the contents of an existing string is with aset (see Array Functions). (aset string idx char) stores char into string at character index idx. It will automatically convert a pure-ASCII string to a multibyte string (see Text Representations) if needed, but we recommend to always make sure string is multibyte (e.g., by using string-to-multibyte, see Converting Representations), if char is a non-ASCII character, not a raw byte.

A more powerful function is store-substring:

Function: store-substring string idx obj -
-

This function alters part of the contents of the specified string, by storing obj starting at character index idx. The argument obj may be either a character (in which case the function behaves exactly as aset) or a (smaller) string. If obj is a multibyte string, we recommend to make sure string is also multibyte, even if it’s pure-ASCII.

Since it is impossible to change the number of characters in an existing string, it is en error if obj consists of more characters than would fit in string starting at character index idx.

-
-

To clear out a string that contained a password, use clear-string:

Function: clear-string string -

This makes string a unibyte string and clears its contents to zeros. It may also change string’s length.

-
-

- Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
- https://www.gnu.org/software/emacs/manual/html_node/elisp/Modifying-Strings.html -

-
-- cgit v1.2.3