Skip to content

Added abbreviation support#6

Merged
DeveloprOfThings merged 1 commit intomainfrom
add-abbreviation-support
Mar 16, 2026
Merged

Added abbreviation support#6
DeveloprOfThings merged 1 commit intomainfrom
add-abbreviation-support

Conversation

@DeveloprOfThings
Copy link
Owner

  • Added useAbbreviation parameter to Kapacity.toString() to suppo…rt toggling between full unit names and abbreviations (e.g., "Megabyte" vs "MB").

  • Updated KapacityUnit enum with metric (e.g., "KB", "MB") and binary (e.g., "KiB", "MiB") abbreviation strings.

  • Refactored Kapacity.toString() logic to handle pluralization for full names and proper suffix selection based on metric/binary flags.

  • Added KapacityToStringTest to verify formatting across various units, edge cases, and unit suffix configurations.

  • Incremented version to 0.9.9-beta07.

…rt toggling between full unit names and abbreviations (e.g., "Megabyte" vs "MB").

- Updated `KapacityUnit` enum with metric (e.g., "KB", "MB") and binary (e.g., "KiB", "MiB") abbreviation strings.
- Refactored `Kapacity.toString()` logic to handle pluralization for full names and proper suffix selection based on metric/binary flags.
- Added `KapacityToStringTest` to verify formatting across various units, edge cases, and unit suffix configurations.
- Incremented version to `0.9.9-beta07`.
@DeveloprOfThings DeveloprOfThings self-assigned this Mar 16, 2026
@DeveloprOfThings DeveloprOfThings added the enhancement New feature or request label Mar 16, 2026
@DeveloprOfThings DeveloprOfThings merged commit c651d03 into main Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant