Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Created June 21, 2015 20:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save krzyzanowskim/7aaf6a46e3c4f2270b78 to your computer and use it in GitHub Desktop.
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