From f6f22586297b8b792b4285e6c3233723987c7b37 Mon Sep 17 00:00:00 2001 From: kalmar Date: Fri, 12 May 2017 20:06:42 +0200 Subject: [PATCH] ASCII compatible subscriptify function --- src/automorphism_groups.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/automorphism_groups.jl b/src/automorphism_groups.jl index 1b71a32..b08d743 100644 --- a/src/automorphism_groups.jl +++ b/src/automorphism_groups.jl @@ -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()