func matches()

in Cyborg/XmlParsing.swift [95:107]


    func matches(_ string: XMLString, at index: Int32) -> Bool {
        let upperbound = index + string.count
        if upperbound <= count {
            for i in 0..<string.count {
                if underlying.advanced(by: Int(i + index)).pointee != string.underlying.advanced(by: Int(i)).pointee {
                    return false
                }
            }
            return true
        } else {
            return false
        }
    }