openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

Add strip format codes for Openplanet formatting #476

Closed ArEyeses79 closed 1 month ago

ArEyeses79 commented 2 months ago

There is currently a StripFormatCodes for Maniaplanet formatting but no builtin way to remove Openplanet formatting. Can we have a StripOpenplanetFormatCodes as well? I don't know if its worth renaming normal StripFormatCodes to StripManiaplanetFormatCodes as well or not.

(This can't be done by modifying the existing function because a \ can exist before a maniaplanet color code)

Using StripFormatCodes(s.Replace('\\$', '$')) technically works but looks like bad code.