Handling ANSI escape codes in strings
I'm currently working on a project that displays output from a remote terminal (read-only, I don't need any other terminal functionality).
Is there any way to parse ANSI escape codes (i.e. \033[0m
) and display text correctly in SwiftUI?
The alternative I'm considering is stripping them using regex.