Skip to content

Instantly share code, notes, and snippets.

@madcato
Last active March 17, 2020 09:20
Show Gist options
  • Save madcato/7b380006d01a7b4953b2cee5f9bec1b1 to your computer and use it in GitHub Desktop.
Save madcato/7b380006d01a7b4953b2cee5f9bec1b1 to your computer and use it in GitHub Desktop.
//
// Optional.swift
// UserLogin
//
// Created by Daniel Vela Angulo on 17/03/2020.
// Copyright © 2020 TBM. All rights reserved.
//
extension Optional where Wrapped == String {
var isNilOrEmpty: Bool {
return self?.isEmpty ?? true
}
var notNilOrEmpty: Bool {
return !isNilOrEmpty
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment