New compatibility function, to_str