Created
September 22, 2021 19:23
-
-
Save yakushevichsv/2b6275418f11fbb8c2cf70a83807d573 to your computer and use it in GitHub Desktop.
Empty String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
static let empty = "" // swift 5.5 allows static let constructs in extension | |
#if DEBUG | |
func check() { | |
assert(Self.empty == "") | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment