Bloomberg Interview Question

How to replace a keyword within a string without using extra space?