This snippet is just a quick revision of the format_string function from string.cIt wraps colored strings to lines of the proper length by ignoring color codes while counting characters.–Selquest