String

extension String
  • Check if the current string is empty. If the string is empty, nil is returned, otherwise, the string is returned.

    Declaration

    Swift

    public var nonEmptyString: String? { get }