• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
String.join()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String.join()?


  • Subject: String.join()?
  • From: Rick Mann <email@hidden>
  • Date: Fri, 04 Sep 2015 14:04:11 -0700

According to the docs in Xcode 7b6, join(_:) is a method on String. But if I try to call it:

    var str = "Hello, playground"
    str.join(["foo","bar"])

error: 'join' is unavailable: call the 'joinWithSeparator()' method on the sequence of elements
str.join(["foo","bar"])
    ^~~~
Swift.String:3:8: note: 'join' has been explicitly marked unavailable here
  func join<S : SequenceType where S.Generator.Element == String>(elements: S) -> String

Of course, I can't command-click on join() to get to its declaration, and option-clicking on it doesn't link to its documentation.

Searching the documentation for joinWithSeparator turns up nothing.

Are my docs just broken, or are Xcode's docs not up-to-date with the language? Does code completion and jumping to declarations and finding docs via source code work for anyone else?

--
Rick Mann
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: String.join()?
      • From: Quincey Morris <email@hidden>
    • Re: String.join()?
      • From: Marco S Hyman <email@hidden>
    • Re: String.join()?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: NSView's in Separate NIB
  • Next by Date: Re: String.join()?
  • Previous by thread: Re: NSView's in Separate NIB
  • Next by thread: Re: String.join()?
  • Index(es):
    • Date
    • Thread