> > Note that there is a distinction between "print an object" and "perform > string interpolation on an object and print that string". > > print(c) // I have the lot > print("\(c)") // I have the lot > debugPrint(c) // I am CustomDebugStringConvertible > debugPrint("\(c)") // "I have the lot" > > Note that (1) string interpolation prefers the non-debug description when > available, and (2) debugPrint() of a String prints the quotes but print() of > a String does not. > >
red face here - I never realized that print() took anything apart from a String. That was pretty thick of me. Makes more sense now. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com