IME // Add expandingTildeInPath to String.
- Also removes the same section from StringUtils.
This commit is contained in:
parent
9977ef4846
commit
b8ba683c9d
|
@ -63,10 +63,6 @@ extension String {
|
|||
return string[..<string.index(string.startIndex, offsetBy: fixedIndex)].utf16.count
|
||||
}
|
||||
|
||||
public var expandingTildeInPath: String {
|
||||
(self as NSString).expandingTildeInPath
|
||||
}
|
||||
|
||||
public func utf16SubString(with range: NSRange) -> String {
|
||||
(self as NSString).substring(with: range)
|
||||
}
|
||||
|
|
|
@ -355,9 +355,16 @@ extension RangeReplaceableCollection where Element: Hashable {
|
|||
}
|
||||
}
|
||||
|
||||
// MARK: - Error Extension
|
||||
// MARK: - String Tildes Expansion Extension
|
||||
|
||||
extension String {
|
||||
public var expandingTildeInPath: String {
|
||||
(self as NSString).expandingTildeInPath
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - String Localized Error Extension
|
||||
|
||||
extension String: Error {}
|
||||
extension String: LocalizedError {
|
||||
public var errorDescription: String? {
|
||||
self
|
||||
|
|
Loading…
Reference in New Issue