Documentation Language: Swift

Method

optionalIfNullableOrOptional(_:)

Append a question mark if the receiver is nullable or optional

func optionalIfNullableOrOptional(_ typeName: String) -> String

Parameters

typeName

The string to optionally turn into an optional

Return Value

The original string, with or without a ? appended