Add append_string function