From b65ba1a411b509a17b66ee9766b5a842da6e1a28 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Fri, 27 Oct 2023 12:00:01 -0700 Subject: [PATCH] initial commits --- symbols/rune/symbols.go | 18 ------------------ symbols/rune/uppercase.go | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 symbols/rune/uppercase.go diff --git a/symbols/rune/symbols.go b/symbols/rune/symbols.go index a5c0b5b..8cae415 100644 --- a/symbols/rune/symbols.go +++ b/symbols/rune/symbols.go @@ -1,9 +1,5 @@ package runesymbols -import ( - "sourcecode.social/reiver/go-hexadeca/symbols/byte" -) - // Persian is used with hexadeca.EncodeByte() to encode a byte into hexadecimal symbols using Persian symbols from Unicode UTF-8. // I.e., // @@ -40,17 +36,3 @@ func Persian(value byte) rune { return result } - -// UpperCase is used with hexadeca.EncodeByte() to encode a byte into hexadecimal symbols using upper-case symbols from ASCII / Unicode UTF-8. -// I.e., -// -// '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' -// -// Example usage: -// -// mostSignificiant, leastSignificant := hexadeca.EncodeByte(value, runesymbols.UpperCase) -// -// If ‘value’ was 254 (== 0xFE) then ‘mostSignificiant’ would be 'F' and and ‘leastSignificant’ would be 'E'. -func UpperCase(value byte) rune { - return rune(bytesymbols.UpperCase(value)) -} diff --git a/symbols/rune/uppercase.go b/symbols/rune/uppercase.go new file mode 100644 index 0000000..1095e25 --- /dev/null +++ b/symbols/rune/uppercase.go @@ -0,0 +1,19 @@ +package runesymbols + +import ( + "sourcecode.social/reiver/go-hexadeca/symbols/byte" +) + +// UpperCase is used with hexadeca.EncodeByte() to encode a byte into hexadecimal symbols using upper-case symbols from ASCII / Unicode UTF-8. +// I.e., +// +// '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' +// +// Example usage: +// +// mostSignificiant, leastSignificant := hexadeca.EncodeByte(value, runesymbols.UpperCase) +// +// If ‘value’ was 254 (== 0xFE) then ‘mostSignificiant’ would be 'F' and and ‘leastSignificant’ would be 'E'. +func UpperCase(value byte) rune { + return rune(bytesymbols.UpperCase(value)) +}