Converter bytes / matriz Uint8 em Int no Swift
Como converter uma matriz de 4 bytes no Int correspondente?
let array: [UInt8] ==> let value : Int
Exemplo:
Entrada:\0\0\0\x0e
Resultado:14
Algum código que encontrei na internet que não funciona:let data = NSData(bytes: array, length: 4)
data.getBytes(&size, length: 4)
// the output to size is 184549376