All I am looking to is take a string and get its hex value. I've been following this post, here is the code I have in the playground:
let str = "Say Hello to My Little Friend"
let data = str.data(using:String.Encoding.utf16)
print("\(data! as NSData)")
PS: Your expected hex is .utf8