Anagrams in swift with wildcard (or joker) : Based on this function in swift

    func anagrams(word: String, from words: [String]) -> [String] {
        let anagrammedWord = word as NSString
        let length = anagrammedWord.length
        var aDic = [unichar:Int]()
        for i in 0..<length {
            let c = anagrammedWord.character(at: i)
            aDic[c] = (aDic[c] ?? 0) + 1
        }
        let foundWords = words.filter {
            let string = $0 as NSString
            guard length == string.length else { return false }
            var bDic = [unichar:Int]()
            for i in 0..<length {
                let c = string.character(at: i)
                let count = (bDic[c] ?? 0) + 1
                if count > aDic[c] ?? 0 {
                    return false
                }
                bDic[c] = count
            }
            return true
        }
        return foundWords
    }

I'm trying to get this working with wildcard, but it doesn't.
how can i check with ? or _
Thanks