Skip to content

Instantly share code, notes, and snippets.

@lidopaglia
Created February 15, 2013 01:50
Show Gist options
  • Save lidopaglia/4958040 to your computer and use it in GitHub Desktop.
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 ɐ
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