Simple implementation to mirror ascii art. It doesn't work with every character as some of them cant be mirrored.
The program works simply by:
- Splitting the art string by new line characters
\n
. - Getting the biggest line from the string.
- Appending the difference as empty characters
' '
between the biggest line and the current line size into the string. - Print each line reversed.
Example of a reversed ASCII cat
) /\_/\ /
(_ ( ^.^ ) /
) \"/
( | | )
(__d b__)
\ /\_/\ (
\ ( ^.^ ) _)
\"/ (
( | | )
(__d b__)