Xcode gives me "No Description" with quick help

Hey new to coding here, so I'm doing the tutorials based on the iBooks "Intro to App Development with Swift" and quick help (option clicking on some code to get info and the quick help inspector on the right) doesn't give me all the info.

Parameters


prefix

No description.


You can see a screenshot here in the Playgrounds section of Xcode here: imgur.com/93YkVi6

I can get the info in the help section of the app, but not in quick help. Thanks for the help!


Here's what I tried:

I deleted everything inside

~/Library/Developer/Xcode/DerivedData
as well as in
~/Library/Caches/com.apple.dt.Xcode


I am using Xcode 11.5

(11E608c)

Replies

What you get here is the documentation for StringProtocol

Declaration

func hasPrefix(_ prefix: String) -> Bool

This is enough information for a quickhelp.



There is also a documentation for Generic Instance Method of Substring, much more detailed. But this is not the one called in quickHelp

hasPrefix(_:)


Returns a Boolean value indicating whether the string begins with the specified prefix.



Language

Swift

SDK

Xcode 10.0+

Framework

Swift Standard Library

On This Page
  • Declaration
  • Parameters
  • Return Value
  • Discussion



Declaration

func hasPrefix<Prefix>(_ prefix: Prefix) -> Bool where Prefix : StringProtocol

Parameters

prefix

A possible prefix to test against this string.

Return Value

true
if the string begins with
prefix
; otherwise,
false
.

Discussion

The comparison is both case sensitive and Unicode safe. The case-sensitive comparison will only match strings whose corresponding characters have the same case.

let cafe = "Café du Monde"  // Case sensitive print(cafe.hasPrefix("café")) // Prints "false"

The Unicode-safe comparison matches Unicode extended grapheme clusters rather than the code points used to compose them. The example below uses two strings with different forms of the

"é"
character—the first uses the composed form and the second uses the decomposed form.
// Unicode safe let composedCafe = "Café" let decomposedCafe = "Cafe\u{0301}"  print(cafe.hasPrefix(composedCafe)) // Prints "true" print(cafe.hasPrefix(decomposedCafe)) // Prints "true"