Skip to content

CFString: implement CFStringFindAndReplace - #85

Merged
rfm merged 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/cfstring-findandreplace
Sep 6, 2026
Merged

rfm merged 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/cfstring-findandreplace

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

CFStringFindAndReplace was a stub that returned 0 and made no change, which also
left CFStringTrim inert since it is implemented with two CFStringFindAndReplace
calls. It now searches the range for each occurrence and replaces it (or deletes
it when the replacement is NULL), returning the number of replacements, so both
CFStringFindAndReplace and CFStringTrim work. Verified against Apple CoreFoundation.

The function was a stub that returned 0 and changed nothing, which also left
CFStringTrim (built on it) inert. Search the range for each match and replace or
delete it, returning the number of replacements.
@DTW-Thalion
DTW-Thalion force-pushed the fix/cfstring-findandreplace branch from cb962c2 to 626d993 Compare July 24, 2026 15:13
@DTW-Thalion DTW-Thalion reopened this Jul 24, 2026
@DTW-Thalion DTW-Thalion reopened this Jul 27, 2026
@rfm
rfm merged commit 0c60da3 into gnustep:master Sep 6, 2026
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants