func countUnkeyed()

in Sources/llbuild2fx/CommandLineArgsCoder.swift [132:145]


    func countUnkeyed(key codingKey: [CodingKey]) -> Int {
        let key = codingKey.map { $0.stringValue }.joined(separator: ".") + "."
        let matchingKeys = strings.compactMap { (k, v) -> Bool? in
            guard k.starts(with: key) else {
                return nil
            }
            let rest = k.dropFirst(key.count)
            guard !rest.isEmpty && rest.first!.isNumber && !rest.contains(".") else {
                return nil
            }
            return true
        }
        return matchingKeys.count
    }