correction
parent
95514c6d86
commit
7c131afc01
|
@ -29,7 +29,7 @@ Upper-Case:
|
||||||
`'0'`, `'1'`, `'2'`, `'3'`, `'4'`, `'5'`, `'6'`, `'7'`, `'8'`, `'9'`, `'A'`, `'B'`, `'C'`, `'D'`, `'E'`, `'F'`.
|
`'0'`, `'1'`, `'2'`, `'3'`, `'4'`, `'5'`, `'6'`, `'7'`, `'8'`, `'9'`, `'A'`, `'B'`, `'C'`, `'D'`, `'E'`, `'F'`.
|
||||||
|
|
||||||
Persian:
|
Persian:
|
||||||
`'۰'` (zero), `'۱'` (one), `'۲'` (two), `'۳'` (three), `'۴'` (four), `'۵'` (five), `'۶'` (six), `'۷'` (seven), `'۸'` (eight) ,`'۹'` (nine), `'ا'` (alef), `'ب '` (be), `'پ '` (pe), `'ت '` (te), `'ث '` (s̱e), `'ج'` (jim).
|
`'۰'` [zero], `'۱'` [one], `'۲'` [two], `'۳'` [three], `'۴'` [four], `'۵'` [five], `'۶'` [six], `'۷'` [seven], `'۸'` [eight], `'۹'` [nine], `'ی'` (ye) [ten], `'ک'` (kāf) [eleven], `'ل'` (lâm) [twelve], `'م'` (mim) [thirteen], `'ن'` (nun) [fourteen], `'س' (sin) [fifteen]
|
||||||
|
|
||||||
As well as defining you own using function:
|
As well as defining you own using function:
|
||||||
```go
|
```go
|
||||||
|
|
|
@ -3,7 +3,7 @@ package runesymbols
|
||||||
// Persian is used with hexadeca.EncodeByte() to encode a byte into hexadecimal symbols using Persian symbols from Unicode UTF-8.
|
// Persian is used with hexadeca.EncodeByte() to encode a byte into hexadecimal symbols using Persian symbols from Unicode UTF-8.
|
||||||
// I.e.,
|
// I.e.,
|
||||||
//
|
//
|
||||||
// '۰' (zero), '۱' (one), '۲' (two), '۳' (three), '۴' (four), '۵' (five), '۶' (six), '۷' (seven), '۸' (eight) ,'۹' (nine), 'ا' (alef), 'ب ' (be), 'پ ' (pe), 'ت ' (te), 'ث ' (s̱e), 'ج' (jim)
|
// '۰' [zero], '۱' [one], '۲' [two], '۳' [three], '۴' [four], '۵' [five], '۶' [six], '۷' [seven], '۸' [eight], '۹' [nine], 'ی' (ye) [ten], 'ک' (kāf) [eleven], 'ل' (lâm) [twelve], 'م' (mim) [thirteen], 'ن' (nun) [fourteen], 'س' (sin) [fifteen]
|
||||||
//
|
//
|
||||||
// Example usage:
|
// Example usage:
|
||||||
//
|
//
|
||||||
|
@ -12,22 +12,22 @@ package runesymbols
|
||||||
// If ‘value’ was 90 (== 0x5A) then ‘mostSignificiant’ would be '۵' and and ‘leastSignificant’ would be '\u0627'.
|
// If ‘value’ was 90 (== 0x5A) then ‘mostSignificiant’ would be '۵' and and ‘leastSignificant’ would be '\u0627'.
|
||||||
func Persian(value byte) rune {
|
func Persian(value byte) rune {
|
||||||
var table [16]rune = [16]rune{
|
var table [16]rune = [16]rune{
|
||||||
'\u06F0', // ۰ (zero)
|
'\u06F0', // ۰ [zero]
|
||||||
'\u06F1', // ۱ (one)
|
'\u06F1', // ۱ [one]
|
||||||
'\u06F2', // ۲ (two)
|
'\u06F2', // ۲ [two]
|
||||||
'\u06F3', // ۳ (three)
|
'\u06F3', // ۳ [three]
|
||||||
'\u06F4', // ۴ (four)
|
'\u06F4', // ۴ [four]
|
||||||
'\u06F5', // ۵ (five)
|
'\u06F5', // ۵ [five]
|
||||||
'\u06F6', // ۶ (six)
|
'\u06F6', // ۶ [six]
|
||||||
'\u06F7', // ۷ (seven)
|
'\u06F7', // ۷ [seven]
|
||||||
'\u06F8', // ۸ (eight)
|
'\u06F8', // ۸ [eight]
|
||||||
'\u06F9', // ۹ (nine)
|
'\u06F9', // ۹ [nine]
|
||||||
'\u0627', // ا (alef)
|
'\u06CC', // ی (ye) [ten]
|
||||||
'\u0628', // ب (be)
|
'\u06A9', // ک (kāf) [eleven]
|
||||||
'\u067E', // پ (pe)
|
'\u0644', // ل (lâm) [twelve]
|
||||||
'\u062A', // ت (te)
|
'\u0645', // م (mim) [thirteen]
|
||||||
'\u062B', // ث (s̱e)
|
'\u0646', // ن (nun) [fourteen]
|
||||||
'\u062C', // ج (jim)
|
'\u0633', // س (sin) [fifteen]
|
||||||
}
|
}
|
||||||
|
|
||||||
var index int = int(value) % len(table)
|
var index int = int(value) % len(table)
|
||||||
|
|
Loading…
Reference in New Issue