2023-10-27 20:31:50 +00:00
|
|
|
package hexadecarunes
|
2023-10-27 08:05:41 +00:00
|
|
|
|
2023-10-27 18:58:14 +00:00
|
|
|
import (
|
2024-07-25 11:33:45 +00:00
|
|
|
"github.com/reiver/go-hexadeca/symbols/rune"
|
2023-10-27 18:58:14 +00:00
|
|
|
)
|
|
|
|
|
2023-10-27 08:05:41 +00:00
|
|
|
func EncodeUint16(value uint16, symbolFunc func(byte)rune) (r3 rune, r2 rune, r1 rune, r0 rune) {
|
2023-10-27 20:31:50 +00:00
|
|
|
r3, r2 = EncodeByte(byte(0x00ff & (value >> (8 ))), symbolFunc)
|
|
|
|
r1, r0 = EncodeByte(byte(0x00ff & value ), symbolFunc)
|
2023-10-27 08:05:41 +00:00
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func EncodeUint16UsingLowerCaseSymbols(value uint16) (r3 rune, r2 rune, r1 rune, r0 rune) {
|
2023-10-27 18:58:14 +00:00
|
|
|
return EncodeUint16(value, runesymbols.LowerCase)
|
2023-10-27 08:05:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func EncodeUint16UsingPersianSymbols(value uint16) (r3 rune, r2 rune, r1 rune, r0 rune) {
|
2023-10-27 18:58:14 +00:00
|
|
|
return EncodeUint16(value, runesymbols.Persian)
|
2023-10-27 08:05:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func EncodeUint16UsingUpperCaseSymbols(value uint16) (r3 rune, r2 rune, r1 rune, r0 rune) {
|
2023-10-27 18:58:14 +00:00
|
|
|
return EncodeUint16(value, runesymbols.UpperCase)
|
2023-10-27 08:05:41 +00:00
|
|
|
}
|