Ask a question to get started
Enter to send•Shift+Enter new line
Perform string replacement with occurrence validation.
perform_string_replacement( content: str, old_string: str, new_string: str, replace_all: bool = False ) -> tuple[str, int] | str
content
str
Original content
old_string
String to replace
new_string
Replacement string
replace_all
bool
False
Whether to replace all occurrences