mas/Tests/MasKitTests/Extensions/String+FileExtension.swift
2021-04-26 21:04:37 -07:00

21 lines
455 B
Swift

//
// String+FileExtension.swift
// MasKitTests
//
// Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
extension String {
/// Returns the file name before the extension.
var fileNameWithoutExtension: String {
(self as NSString).deletingPathExtension
}
/// Returns the file extension.
var fileExtension: String {
(self as NSString).pathExtension
}
}