Skip to content

Add byte-range string replacement to Core string. - #87

Merged
M-Fatah merged 1 commit into
mainfrom
core-string-range-replace
Oct 4, 2026
Merged

M-Fatah merged 1 commit into
mainfrom
core-string-range-replace

Conversation

@M-Fatah

@M-Fatah M-Fatah commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Add string_replace(string, start, count, replacement) to replace a byte range in place. A zero count inserts; an empty replacement deletes. For example, replacing two bytes at offset 1 in abcd with XYZ produces aXYZd.

Provide overloads for Slice<const char>, String, C strings, and pointer/count pairs. The operation preserves embedded nulls and the trailing terminator, reuses available capacity, and moves only the suffix. Replacement data must remain readable outside the destination allocation for the call.

@M-Fatah M-Fatah self-assigned this Oct 4, 2026
@M-Fatah M-Fatah added feature New feature or request. refactor Code cleaning up or re-writing. labels Oct 4, 2026
@M-Fatah M-Fatah changed the title Add byte-range string replacement Add byte-range string replacement to Core string. Oct 4, 2026
@M-Fatah
M-Fatah merged commit 1e59420 into main Oct 4, 2026
10 checks passed
@M-Fatah
M-Fatah deleted the core-string-range-replace branch October 4, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request. refactor Code cleaning up or re-writing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant