Schafkopf-Server/Sources/App/Extensions/String+Extensions.swift

13 lines
196 B
Swift
Raw Normal View History

2022-10-11 11:52:39 +02:00
import Foundation
extension String {
var trimmed: String {
trimmingCharacters(in: .whitespacesAndNewlines)
}
var nonEmpty: String? {
self == "" ? nil : self
}
}