diff options
| author | Mattias EngdegÄrd | 2024-05-13 10:44:05 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-05-13 12:39:41 +0200 |
| commit | 49e243c0c85d18fc775970d9ebd846eba3a6866e (patch) | |
| tree | 2ee32a6f81bfe93b7d0f3f84d83ee82f655808d1 /src | |
| parent | 334fb0ddfe603097c3493297c3e78a185b22d1af (diff) | |
| download | emacs-49e243c0c85d18fc775970d9ebd846eba3a6866e.tar.gz emacs-49e243c0c85d18fc775970d9ebd846eba3a6866e.zip | |
Avoid resizing mutation in subst-char-in-string, take two
This time we take care to preserve properties, and add a test.
* lisp/subr.el (subst-char-in-string):
Use string-replace to avoid resizing mutation and O(n^2) time.
* test/lisp/subr-tests.el (subr--subst-char-in-string): New test.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions