     
     var n = 0 // repeat counter
     
-    while mutableFormat.characters.count > 0 {
+    while !mutableFormat.isEmpty {
         
         let c = mutableFormat.remove(at: mutableFormat.startIndex)
         

                }
                bytes = data.bytes
            case "b":
                bytes = Int8(truncatingBitPattern:o as! Int).data.bytes
            case "h":
                bytes = Int16(truncatingBitPattern:o as! Int).data.bytes
            case "i", "l":
                bytes = Int32(truncatingBitPattern:o as! Int).data.bytes
            case "q", "Q":
                bytes = Int64(o as! Int).data.bytes
            case "B":
                bytes = UInt8(truncatingBitPattern:o as! Int).data.bytes
            case "H":
                bytes = UInt16(truncatingBitPattern:o as! Int).data.bytes
            case "I", "L":
                bytes = UInt32(truncatingBitPattern:o as! Int).data.bytes
            case "f":
                bytes = Float32(o as! Double).data.bytes
            case "d":

        return nil
    }
    
    var data = Data(capacity: s.count / 2)
    
    for i in stride(from: 0, to:s.count, by:2) {
        let byteString = s[i, i+2]
        let byte = UInt8(byteString.withCString { strtoul($0, nil, 16) })
        data.append([byte] as [UInt8], count: 1)
