Optional
public extension Optional
-
Unwraps this optional and converts its value into a string via
String(describing:)
or returns the fallback string if the optional is nil.Declaration
Swift
func stringified(_ fallback: String = .empty) -> String
Parameters
fallback
The string to return when this optional is nil (defaults to the empty string “”).
Return Value
The optional’s value as a string or the fallback string.