I've added corresponding write functions. For a file, you can use file_str_write/readto and then convert the strings.