Skip to content

Allow changing default base when parsing Bytes #33

Description

@clonejo

Current behavior:

assert_eq!(Byte::parse_str("1k", true).unwrap().as_u64(), 1000);

For my usecase, i would like to default to base 1024, not base 1000.

For example, ls -lh from GNU coreutils uses 1K for base 1024, and 1kB for base 1000.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions