Public API

This page lists exported symbols of CTBase.Unicode.


From CTBase.Unicode

CTBase.Unicode

CTBase.UnicodeModule
Unicode

Unicode character utilities for CTBase.

This module provides functions for converting integers to Unicode subscript and superscript characters, useful for mathematical notation and display.

ctindice

CTBase.Unicode.ctindiceFunction
ctindice(i::Int64) -> Char

Return the integer i ∈ [0, 9] as a Unicode subscript character.

Throws an CTBase.Exceptions.IncorrectArgument exception if i is outside this range.

The Unicode subscript digits start at codepoint U+2080 for '0' and continue sequentially.

Example

julia> using CTBase

julia> CTBase.ctindice(3)
'₃': Unicode U+2083 (category No: Number, other)

ctindices

CTBase.Unicode.ctindicesFunction
ctindices(i::Int64) -> String

Return the integer i ≥ 0 as a string of Unicode subscript characters.

Throws an CTBase.Exceptions.IncorrectArgument if i is negative.

Example

julia> using CTBase

julia> CTBase.ctindices(123)
"₁₂₃"

ctupperscript

CTBase.Unicode.ctupperscriptFunction
ctupperscript(i::Int64) -> Char

Return the integer i ∈ [0, 9] as a Unicode superscript (upper) character.

Throws an CTBase.Exceptions.IncorrectArgument exception if i is outside this range.

Note: Unicode superscripts ¹ (U+00B9), ² (U+00B2), and ³ (U+00B3) are special cases. The other digits ⁰ (U+2070) and ⁴ to ⁹ (U+2074 to U+2079) are mostly contiguous.

Example

julia> using CTBase

julia> CTBase.ctupperscript(2)
'²': Unicode U+00B2 (category No: Number, other)

ctupperscripts

CTBase.Unicode.ctupperscriptsFunction
ctupperscripts(i::Int64) -> String

Return the integer i ≥ 0 as a string of Unicode superscript characters.

Throws an CTBase.Exceptions.IncorrectArgument if i is negative.

Example

julia> using CTBase

julia> CTBase.ctupperscripts(123)
"¹²³"