move replace_all function to base/string.h