Effective? C implementation of multiple key-value replacement in provided string.