mirror of
https://github.com/osmarks/random-stuff
synced 2024-10-31 19:06:15 +00:00
15 lines
697 B
Go
Executable File
15 lines
697 B
Go
Executable File
package main
|
|
|
|
var cp437 = []rune("\x00☺☻♥♦♣♠•◘○◙♂♀♪♬☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\u00A0")
|
|
|
|
func mapCP437(s string) string {
|
|
b := []byte(s)
|
|
r := make([]rune, len(b))
|
|
|
|
for i, c := range b {
|
|
r[i] = cp437[c]
|
|
}
|
|
|
|
return string(r)
|
|
}
|