21 lines
307 B
Go
21 lines
307 B
Go
package vt220
|
|
|
|
type equivalenceTable map[rune]rune
|
|
|
|
type EquivalenceTable struct {
|
|
et equivalenceTable
|
|
}
|
|
|
|
func (table EquivalenceTable) Normalize(r rune) rune {
|
|
if normal, ok := table.et[r]; ok {
|
|
return normal
|
|
}
|
|
return r
|
|
}
|
|
|
|
var Equivalence = EquivalenceTable{
|
|
et: equivalenceTable{
|
|
'a': 'a',
|
|
},
|
|
}
|