Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import UIKit
class Test {
func remove(bytes: [UInt8]) -> Int {
var padding = Int(bytes.last!)
if padding >= 1 {
return padding
}
return padding
}
}
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let arr:[UInt8] = [84, 104, 105, 115, 32, 105, 115, 32, 109, 121, 32, 111, 114, 105, 103, 105, 110, 97, 108, 32, 116, 101, 120, 116, 8, 8, 8, 8, 8, 8, 8]
let test = Test()
print(test.remove(arr))
exit(0)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment