Replace from_c_str with from_buf