diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/elisp/modifying-strings.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/elisp/modifying-strings.html')
| -rw-r--r-- | devdocs/elisp/modifying-strings.html | 12 |
1 files changed, 0 insertions, 12 deletions
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 @@ - <h3 class="section">Modifying Strings</h3> <p>You can alter the contents of a mutable string via operations described in this section. See <a href="mutability">Mutability</a>. </p> <p>The most basic way to alter the contents of an existing string is with <code>aset</code> (see <a href="array-functions">Array Functions</a>). <code>(aset <var>string</var> <var>idx</var> <var>char</var>)</code> stores <var>char</var> into <var>string</var> at character index <var>idx</var>. It will automatically convert a pure-<acronym>ASCII</acronym> <var>string</var> to a multibyte string (see <a href="text-representations">Text Representations</a>) if needed, but we recommend to always make sure <var>string</var> is multibyte (e.g., by using <code>string-to-multibyte</code>, see <a href="converting-representations">Converting Representations</a>), if <var>char</var> is a non-<acronym>ASCII</acronym> character, not a raw byte. </p> <p>A more powerful function is <code>store-substring</code>: </p> <dl> <dt id="store-substring">Function: <strong>store-substring</strong> <em>string idx obj</em> -</dt> <dd> -<p>This function alters part of the contents of the specified <var>string</var>, by storing <var>obj</var> starting at character index <var>idx</var>. The argument <var>obj</var> may be either a character (in which case the function behaves exactly as <code>aset</code>) or a (smaller) string. If <var>obj</var> is a multibyte string, we recommend to make sure <var>string</var> is also multibyte, even if it’s pure-<acronym>ASCII</acronym>. </p> <p>Since it is impossible to change the number of characters in an existing string, it is en error if <var>obj</var> consists of more characters than would fit in <var>string</var> starting at character index <var>idx</var>. </p> -</dd> -</dl> <p>To clear out a string that contained a password, use <code>clear-string</code>: </p> <dl> <dt id="clear-string">Function: <strong>clear-string</strong> <em>string</em> -</dt> <dd><p>This makes <var>string</var> a unibyte string and clears its contents to zeros. It may also change <var>string</var>’s length. </p></dd> -</dl><div class="_attribution"> - <p class="_attribution-p"> - Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> - <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Modifying-Strings.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Modifying-Strings.html</a> - </p> -</div> |
