I'm looking for a way to take an existing character vector with ANSI control codes and treat it as a cli_ansi_string object. Now I could do this by just setting the class of the vector, but I would prefer using a public function for this. ansi_string seems to have some other encoding logic in it too. Internally it seems that you use ansi_string() to do this. Could this become part of the public API?
I'm looking for a way to take an existing character vector with ANSI control codes and treat it as a
cli_ansi_stringobject. Now I could do this by just setting the class of the vector, but I would prefer using a public function for this.ansi_stringseems to have some other encoding logic in it too. Internally it seems that you useansi_string()to do this. Could this become part of the public API?