I have an NSMutable dictionary that contains file IDs and their filename+extension in the simple form of fileone.doc or filetwo.pdf. I need to determine what type of file it
In Swift 3 you could use an extension:
extension String { public func getExtension() -> String? { let ext = (self as NSString).pathExtension if ext.isEmpty { return nil } return ext } }