You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the package, nice to have an alternative approach to the Unitful type-based one.
Is there a way in this package to convert back and fourth between Quantities and String representations so that quantities could be serialised to strings and parsed back again? Like in Unitful, string(q::Quantity) prints a space between the last numeral and the unit, which yields an error with uparse.
The text was updated successfully, but these errors were encountered:
Just so I understand, would you want a way to parse the current pretty-printed output? Or would you want to have a printing function that gives something you can directly type into the REPL?
Btw, is there a function in Base for prints that aim to give a string representation that can be typed back into the REPL? Like some show(::IO, ::Val{:raw}, x) or something?
Just so I understand, would you want a way to parse the current pretty-printed output? Or would you want to have a printing function that gives something you can directly type into the REPL?
I suppose either would suit my needs, maybe parsing units with the space might make more sense as "2 mL"/1 nM" etc is a pretty common way to write these quantities for humans!
Btw, is there a function in Base for prints that aim to give a string representation that can be typed back into the REPL? Like some show(::IO, ::Val{:raw}, x) or something?
I was looking and didn't find it, though I did realise I don't understand Julia's display system as well as I should.
Hi, thanks for the package, nice to have an alternative approach to the Unitful type-based one.
Is there a way in this package to convert back and fourth between Quantities and String representations so that quantities could be serialised to strings and parsed back again? Like in Unitful,
string(q::Quantity)
prints a space between the last numeral and the unit, which yields an error withuparse
.The text was updated successfully, but these errors were encountered: