mirror of
https://github.com/osmarks/random-stuff
synced 2024-11-09 22:09:55 +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)
|
|
}
|