Skip to content

Add FromStr implementation for MemorySize #15

@funnyboy-roks

Description

@funnyboy-roks

Add a FromStr implementation for MemorySize.

The parsing should account for the following:

  • String pattern should be <number> <unit> (i.e., 5 B, 42 KiB, 10 GB)
  • The space after the number should be optional: 5b == 5 b
  • Unit should be case-insensitive: 5b == 5B

Tests should be written for each of these cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions