Handle len<1 in r_str_ansi_filter