mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-13 22:27:34 +01:00
ASCII compatible subscriptify function
This commit is contained in:
parent
51baeb1326
commit
f6f2258629
@ -37,11 +37,11 @@ end
|
|||||||
|
|
||||||
ɛ(i, pow=1) = v -> [(k==i ? v[k]^(-1*(2+pow%2)%2) : v[k]) for k in eachindex(v)]
|
ɛ(i, pow=1) = v -> [(k==i ? v[k]^(-1*(2+pow%2)%2) : v[k]) for k in eachindex(v)]
|
||||||
|
|
||||||
# taken from ValidatedNumerics
|
# taken from ValidatedNumerics, under under the MIT "Expat" License:
|
||||||
|
# https://github.com/JuliaIntervals/ValidatedNumerics.jl/blob/master/LICENSE.md
|
||||||
function subscriptify(n::Int)
|
function subscriptify(n::Int)
|
||||||
dig = reverse(digits(n))
|
subscript_0 = Int(0x2080) # Char(0x2080) -> subscript 0
|
||||||
subscript_0 = Int('₀') # 0x2080
|
return join([Char(subscript_0 + i) for i in reverse(digits(n))])
|
||||||
join([Char(subscript_0 + i) for i in dig])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function id_autsymbol()
|
function id_autsymbol()
|
||||||
|
Loading…
Reference in New Issue
Block a user