Closed chadjefferies closed 1 year ago
Hey @chadjefferies, I'm glad to know you're finding this library useful!
As it stands, there's no built in function to parse the strings using the 1.0 behavior. Your best bet is to manipulate the string before passing it in as you mentioned.
Hello and thank you for providing such a helpful library.
I am wondering if there is a recommended way of parsing legacy strings?
I don't have control over the string values but the expectation is that they should all result in the binary system's value of bytes.
So, for example, my application needs to parse strings that are formatted as such as
ByteSize.Parse("4GB")
but as the binary representation, so that the resulting ByteSize.Bytes field is equal to 4294967296 and not 4000000000.There are some hacky things I can do to manipulate the string before passing it into ByteSize, but was wondering if I was missing a library feature that would enable this functionality (other than downgrading to 1.0).
Thanks!