Move some extensions into SAX package.

This commit is contained in:
Brent Simmons
2024-08-26 20:56:20 -07:00
parent d13014787a
commit f63af89e31
3 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
//
// String+RSParser.swift
// RSParser
//
// Created by Nate Weaver on 2020-01-19.
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
//
import Foundation
extension String {
var nilIfEmptyOrWhitespace: String? {
return self.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? nil : self
}
static func isEmptyOrNil(_ s: String?) -> Bool {
if let s {
return s.isEmpty
}
return true
}
}