diff --git a/Sources/App/Extensions/String+Extensions.swift b/Sources/App/Extensions/String+Extensions.swift new file mode 100644 index 0000000..88824bf --- /dev/null +++ b/Sources/App/Extensions/String+Extensions.swift @@ -0,0 +1,12 @@ +import Foundation + +extension String { + + var trimmed: String { + trimmingCharacters(in: .whitespacesAndNewlines) + } + + var nonEmpty: String? { + self == "" ? nil : self + } +}