Created
February 15, 2013 01:50
-
-
Save lidopaglia/4958040 to your computer and use it in GitHub Desktop.
uʍop ǝpısdn ʇı ssɐd noʎ ʇxǝʇ ǝɥʇ dılɟ oʇ uoıʇɔunɟ ǝlʇʇıl ɐ
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
function FlipText ([string]$Text){ | |
<# | |
.SYNOPSIS | |
Takes a string of text and flips it upsidedown | |
.LINK | |
http://www.leancrew.com/all-this/2009/05/im-feelin-upside-down/ | |
#> | |
$pchars = "abcdefghijklmnopqrstuvwxyz,.?!'()[]{} " | |
$fchars = "ɐqɔpǝɟƃɥıɾʞlɯuodbɹsʇnʌʍxʎz'˙¿¡,)(][}{ " | |
for($i=0;$i -lt $pchars.Length;$i++){ | |
$dict += @{"$($pchars[$i])" = "$($fchars[$i])"} | |
} | |
$result = (($text.tolower()).GetEnumerator() | % { $dict.item("$_") }) -join "" | |
$result = -join $result[$result.Length..0] | |
$result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment