Skip to content

ListFormatStyle missing #4596

Closed
Closed
@0xTim

Description

@0xTim

The Objective-C Foundation has a ListFormatStyle for formatting collections as described at https://developer.apple.com/documentation/foundation/listformatstyle. This does not exist in Swift Foundation.

Expected Result:

Using someArrayOfStrings.formatted(.list(type: .and)) works on both macOS and Linux

Actual Result:

.../Something.swift:151:46: error: value of type '[String]' has no member 'formatted'
let formatted = someArrayOfStrings.formatted(.list(type: .and))

Steps to reproduce

let someArrayOfStrings = ["Alice", "Bob", "Charlie"]
let formatted = someArrayOfStrings.formatted(.list(type: .and))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions