Is there any way to update the part of a string
by passing it in a function?
std::string str = "hello world";
I want to reverse part of the string for example from index 4 to 8.
I have a function that reverses a string from start index to end index. How I can pass the string from index 4 to 8 to that function so that it will be updated automatically in the str
string.