Created
October 12, 2025 20:50
-
-
Save ninmonkey/264c826d3d08eb88a85f7c59d34d34af to your computer and use it in GitHub Desktop.
Tiny Escape Control Char Pwsh7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filter EscapeCC { | |
| ($_)?.EnumerateRunes() | % { | |
| ($_.Value -le 32) ? [Text.Rune]( $_.Value + 0x2400 ) : $_ | |
| } | Join-String | |
| } | |
| "sdf `a sdjf hi world`t`n ${fg:#feaa99} more stuff `u{0} `r`n blah" | escapeCC | |
| # outputs: sdf␠␇␠sdjf␠hi␠world␉␊␠␛[38;2;254;170;153m␠more␠stuff␠␀␠␍␊␠blah |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment