Tools class: String replace as an assoc. array