UnitParser.jl

Simple units parser for julia.
Author Kolaru
Popularity
3 Stars
Updated Last
5 Months Ago
Started In
August 2020

UnitParser.jl

Small implementation of general unit parsing.

The basic function is parse_units, transforming a string into a Unitful unit.

julia> parse_units("nanoamps3 seconds / micrometer^2")
nA^3 s μm^-2

At its core this package just transform a complicated string to one that Unitful can parse. You can get that simpler string by using reduce_units_expr.

julia> using Unitful

julia> s = reduce_units_expr("kilometers / m^2")
"km*m^-2"

julia> uparse(s)
km m^-2

Used By Packages

No packages found.