KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have searched. But still couldnt get it. I'm converting NSdata to NSString. When I do [data description]; it returns me <00000000 31323334 35363738> Yes, Im receiving my string @"12345678". How do I convert it to NSString appropriately? I tried NSString *b = [NSString stringWithUTF8String:[data bytes]]; NSString *a = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding]; Both returns me null. Any idea? Thanks Hi all, Thanks for all suggestion. It appears to be constant whereby theres a null character infront always. So whenever I receive something, i just remove the first <00000000>, then its working fine already
Tags (comma-separated)
Save Edits
Cancel