preserve-case
There are 2 repositories under preserve-case topic.
jedwards1211/preserve-case
very comprehensive case-preserving string.replace
ruzicka/preserve-case-replace
Replaces substring in a text while preserving case and grammatical number (plural/singular)