home.social

#binaryprefix — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #binaryprefix, aggregated by home.social.

  1. The only usable ByteCountFormatStyle is decimal

    Swift makes it relatively easy to format numbers as byte counts, with appropriate suffixes to indicate units and generally sensible auto-selection of scale factors. e.g.:

    1234.formatted(.byteCount(style: .decimal))

    1 kB(in English - results may vary depending on locale)

    This is just a small subset of Swift's FormatStyle-based formatting capabilities, with which I have a bit of a love-hate relationship even when they're working correctly.

    Alas, they don't always work correctly; some of [...]

    wadetregaskis.com/the-only-usa

  2. The only usable ByteCountFormatStyle is decimal

    Swift makes it relatively easy to format numbers as byte counts, with appropriate suffixes to indicate units and generally sensible auto-selection of scale factors. e.g.:

    1234.formatted(.byteCount(style: .decimal))

    1 kB(in English - results may vary depending on locale)

    This is just a small subset of Swift's FormatStyle-based formatting capabilities, with which I have a bit of a love-hate relationship even when they're working correctly.

    Alas, they don't always work correctly; some of [...]

    wadetregaskis.com/the-only-usa

  3. The only usable ByteCountFormatStyle is decimal

    Swift makes it relatively easy to format numbers as byte counts, with appropriate suffixes to indicate units and generally sensible auto-selection of scale factors. e.g.:

    1234.formatted(.byteCount(style: .decimal))

    1 kB(in English - results may vary depending on locale)

    This is just a small subset of Swift's FormatStyle-based formatting capabilities, with which I have a bit of a love-hate relationship even when they're working correctly.

    Alas, they don't always work correctly; some of [...]

    wadetregaskis.com/the-only-usa