1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-26 02:20:30 +01:00

ASCII compatible subscriptify function

This commit is contained in:
kalmar 2017-05-12 20:06:42 +02:00
parent 51baeb1326
commit f6f2258629

View File

@ -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)]
# 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)
dig = reverse(digits(n))
subscript_0 = Int('₀') # 0x2080
join([Char(subscript_0 + i) for i in dig])
subscript_0 = Int(0x2080) # Char(0x2080) -> subscript 0
return join([Char(subscript_0 + i) for i in reverse(digits(n))])
end
function id_autsymbol()