replace method
Replaces characters in the specified range with the given string.
start
the starting index (inclusive)
end
the ending index (exclusive)
str
the replacement string
Returns this StringBuilder for method chaining
Implementation
StringBuilder replace(int start, int end, String str) {
delete(start, end);
insert(start, str);
return this;
}