Skip to content

[SR-1428] Add default argument to Sequence.joined(separator:) method #44037

@benrimmington

Description

@benrimmington
Previous ID SR-1428
Radar None
Original Reporter @benrimmington
Type Improvement
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Improvement
Assignee None
Priority Medium

md5: a5f63c1a862ff9e824a317866e8a345b

Issue Description:

A joined sequence of sequences could use an EmptyCollection as the default separator.

A joined sequence of strings could use an empty string as the default separator.

  1> ["con", "caten", "ated"].joined()
$R0: String = "concatenated"
  2> ["hyphen", "ated"].joined(separator: "-")
$R1: String = "hyphen-ated"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions