use write_str_in_full helper to avoid literal string lengths